Kodi Docs 20.0
Kodi is an open source media player and entertainment hub.
CLog Class Reference

#include <log.h>

Inheritance diagram for CLog:
ISettingsHandler ISettingCallback

Public Member Functions

 CLog ()
 
 ~CLog ()=default
 
void OnSettingsLoaded () override
 Settings have been loaded. More...
 
void OnSettingChanged (const std::shared_ptr< const CSetting > &setting) override
 The value of the given setting has changed. More...
 
void Initialize (const std::string &path)
 
void Uninitialize ()
 
void SetLogLevel (int level)
 
int GetLogLevel ()
 
bool IsLogLevelLogged (int loglevel)
 
bool CanLogComponent (uint32_t component) const
 
Logger GetLogger (const std::string &loggerName)
 
- Public Member Functions inherited from ISettingsHandler
virtual ~ISettingsHandler ()=default
 
virtual bool OnSettingsLoading ()
 Settings loading has been initiated. More...
 
virtual bool OnSettingsSaving () const
 Settings saving has been initiated. More...
 
virtual void OnSettingsSaved () const
 Settings have been saved. More...
 
virtual void OnSettingsUnloaded ()
 Setting values have been unloaded. More...
 
virtual void OnSettingsCleared ()
 Settings have been cleared. More...
 
- Public Member Functions inherited from ISettingCallback
virtual ~ISettingCallback ()=default
 
virtual bool OnSettingChanging (const std::shared_ptr< const CSetting > &setting)
 The value of the given setting is being changed. More...
 
virtual void OnSettingAction (const std::shared_ptr< const CSetting > &setting)
 The given setting has been activated. More...
 
virtual bool OnSettingUpdate (const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode)
 The given setting needs to be updated. More...
 
virtual void OnSettingPropertyChanged (const std::shared_ptr< const CSetting > &setting, const char *propertyName)
 The given property of the given setting has changed. More...
 

Static Public Member Functions

static void SettingOptionsLoggingComponentsFiller (const std::shared_ptr< const CSetting > &setting, std::vector< IntegerSettingOption > &list, int &current, void *data)
 
template<typename... Args>
static void Log (int level, const char *format, Args &&... args)
 
template<typename... Args>
static void Log (int level, uint32_t component, const char *format, Args &&... args)
 
template<typename... Args>
static void Log (spdlog::level::level_enum level, const char *format, Args &&... args)
 
template<typename... Args>
static void Log (spdlog::level::level_enum level, uint32_t component, const char *format, Args &&... args)
 
template<typename... Args>
static void LogFunction (int level, const char *functionName, const char *format, Args &&... args)
 
template<typename... Args>
static void LogFunction (int level, const char *functionName, uint32_t component, const char *format, Args &&... args)
 
template<typename... Args>
static void LogFunction (spdlog::level::level_enum level, const char *functionName, const char *format, Args &&... args)
 
template<typename... Args>
static void LogFunction (spdlog::level::level_enum level, const char *functionName, uint32_t component, const char *format, Args &&... args)
 

Constructor & Destructor Documentation

◆ CLog()

CLog::CLog ( )

◆ ~CLog()

CLog::~CLog ( )
default

Member Function Documentation

◆ CanLogComponent()

bool CLog::CanLogComponent ( uint32_t  component) const

◆ GetLogger()

Logger CLog::GetLogger ( const std::string &  loggerName)

◆ GetLogLevel()

int CLog::GetLogLevel ( )
inline

◆ Initialize()

void CLog::Initialize ( const std::string &  path)

◆ IsLogLevelLogged()

bool CLog::IsLogLevelLogged ( int  loglevel)

◆ Log() [1/4]

template<typename... Args>
static void CLog::Log ( int  level,
const char *  format,
Args &&...  args 
)
inlinestatic

◆ Log() [2/4]

template<typename... Args>
static void CLog::Log ( int  level,
uint32_t  component,
const char *  format,
Args &&...  args 
)
inlinestatic

◆ Log() [3/4]

template<typename... Args>
static void CLog::Log ( spdlog::level::level_enum  level,
const char *  format,
Args &&...  args 
)
inlinestatic

◆ Log() [4/4]

template<typename... Args>
static void CLog::Log ( spdlog::level::level_enum  level,
uint32_t  component,
const char *  format,
Args &&...  args 
)
inlinestatic

◆ LogFunction() [1/4]

template<typename... Args>
static void CLog::LogFunction ( int  level,
const char *  functionName,
const char *  format,
Args &&...  args 
)
inlinestatic

◆ LogFunction() [2/4]

template<typename... Args>
static void CLog::LogFunction ( int  level,
const char *  functionName,
uint32_t  component,
const char *  format,
Args &&...  args 
)
inlinestatic

◆ LogFunction() [3/4]

template<typename... Args>
static void CLog::LogFunction ( spdlog::level::level_enum  level,
const char *  functionName,
const char *  format,
Args &&...  args 
)
inlinestatic

◆ LogFunction() [4/4]

template<typename... Args>
static void CLog::LogFunction ( spdlog::level::level_enum  level,
const char *  functionName,
uint32_t  component,
const char *  format,
Args &&...  args 
)
inlinestatic

◆ OnSettingChanged()

void CLog::OnSettingChanged ( const std::shared_ptr< const CSetting > &  setting)
overridevirtual

The value of the given setting has changed.

This callback is triggered whenever the value of a setting has been successfully changed (i.e. none of the OnSettingChanging() handlers) has reverted the change.

Parameters
settingThe setting whose value has been changed

Reimplemented from ISettingCallback.

◆ OnSettingsLoaded()

void CLog::OnSettingsLoaded ( )
overridevirtual

Settings have been loaded.

This callback can be used to trigger loading other settings.

Reimplemented from ISettingsHandler.

◆ SetLogLevel()

void CLog::SetLogLevel ( int  level)

◆ SettingOptionsLoggingComponentsFiller()

void CLog::SettingOptionsLoggingComponentsFiller ( const std::shared_ptr< const CSetting > &  setting,
std::vector< IntegerSettingOption > &  list,
int current,
void data 
)
static

◆ Uninitialize()

void CLog::Uninitialize ( )

The documentation for this class was generated from the following files: