Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CLog Class Reference

#include <log.h>

Inheritance diagram for CLog:
ISettingsHandler ISettingCallback

Public Member Functions

 CLog ()
 
 ~CLog ()
 
void OnSettingsLoaded () override
 Settings have been loaded.
 
void OnSettingChanged (const std::shared_ptr< const CSetting > &setting) override
 The value of the given setting has changed.
 
void Initialize (const std::string &path)
 
void UnregisterFromSettings ()
 
void Deinitialize ()
 
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.
 
virtual bool OnSettingsSaving () const
 Settings saving has been initiated.
 
virtual void OnSettingsSaved () const
 Settings have been saved.
 
virtual void OnSettingsUnloaded ()
 Setting values have been unloaded.
 
virtual void OnSettingsCleared ()
 Settings have been cleared.
 
- 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.
 
virtual void OnSettingAction (const std::shared_ptr< const CSetting > &setting)
 The given setting has been activated.
 
virtual bool OnSettingUpdate (const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode)
 The given setting needs to be updated.
 
virtual void OnSettingPropertyChanged (const std::shared_ptr< const CSetting > &setting, const char *propertyName)
 The given property of the given setting has changed.
 

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, fmt::format_string< Args... > format, Args &&... args)
 
template<typename... Args>
static void Log (int level, uint32_t component, fmt::format_string< Args... > format, Args &&... args)
 
template<typename... Args>
static void Log (spdlog::level::level_enum level, fmt::format_string< Args... > format, Args &&... args)
 
template<typename... Args>
static void Log (spdlog::level::level_enum level, uint32_t component, fmt::format_string< Args... > format, Args &&... args)
 

Constructor & Destructor Documentation

◆ CLog()

CLog::CLog ( )

◆ ~CLog()

CLog::~CLog ( )

Member Function Documentation

◆ CanLogComponent()

bool CLog::CanLogComponent ( uint32_t component) const

◆ Deinitialize()

void CLog::Deinitialize ( )

◆ 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,
fmt::format_string< Args... > format,
Args &&... args )
inlinestatic

◆ Log() [2/4]

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

◆ Log() [3/4]

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

◆ Log() [4/4]

template<typename... Args>
static void CLog::Log ( spdlog::level::level_enum level,
uint32_t component,
fmt::format_string< Args... > 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

◆ UnregisterFromSettings()

void CLog::UnregisterFromSettings ( )

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