AYON Cpp Api  0.1.0
Loading...
Searching...
No Matches
AyonLogger Class Reference

Simple Logger Class that wraps around spdlog in order to expose easy logging functions
AyonLogger::getInstance(log_File_path.json) init code
automaticly logs to file and console. More...

#include <AyonLogger.h>

Collaboration diagram for AyonLogger:

Public Member Functions

std::set< std::string >::iterator key (const std::string &key)
 
bool regesterLoggingKey (const std::string &KeyName)
 
bool unregisterLoggingKey (const std::string &KeyName)
 
bool isKeyActive (const std::set< std::string >::iterator &logginIterator)
 
template<typename... Args>
void error (const std::set< std::string >::iterator &logginIterator, const std::string &format, const Args &... args)
 
template<typename... Args>
void error (const std::string &format, const Args &... args)
 
template<typename... Args>
void info (const std::set< std::string >::iterator &logginIterator, const std::string &format, const Args &... args)
 
template<typename... Args>
void info (const std::string &format, const Args &... args)
 
template<typename... Args>
void warn (const std::set< std::string >::iterator &logginIterator, const std::string &format, const Args &... args)
 
template<typename... Args>
void warn (const std::string &format, const Args &... args)
 
template<typename... Args>
void critical (const std::set< std::string >::iterator &logginIterator, const std::string &format, const Args &... args)
 
template<typename... Args>
void critical (const std::string &format, const Args &... args)
 
void LogLevlInfo (const bool &alsoSetFileLogger=false)
 
void LogLevlError (const bool &alsoSetFileLogger=false)
 
void LogLevlWarn (const bool &alsoSetFileLogger=false)
 
void LogLevlCritical (const bool &alsoSetFileLogger=false)
 
void LogLevlOff (const bool &alsoSetFileLogger=false)
 

Static Public Member Functions

static AyonLoggergetInstance (const std::string &filepath)
 

Private Member Functions

 AyonLogger (const std::string &filepath)
 
template<typename... Args>
void log (const std::string &level, const std::string &massage, const Args &... args)
 

Private Attributes

std::shared_ptr< spdlog::logger > console_logger_
 
std::shared_ptr< spdlog::logger > file_logger_
 
bool enableFileLogging
 
bool fileLoggerFilePathOverwrite
 
std::string fileLoggerFilePath
 
std::set< std::string > EnabledLoggingKeys
 

Detailed Description

Simple Logger Class that wraps around spdlog in order to expose easy logging functions
AyonLogger::getInstance(log_File_path.json) init code
automaticly logs to file and console.

Constructor & Destructor Documentation

◆ AyonLogger()

AyonLogger::AyonLogger ( const std::string &  filepath)
inlineprivate

Member Function Documentation

◆ critical() [1/2]

template<typename... Args>
void AyonLogger::critical ( const std::set< std::string >::iterator &  logginIterator,
const std::string &  format,
const Args &...  args 
)
inline
Here is the call graph for this function:

◆ critical() [2/2]

template<typename... Args>
void AyonLogger::critical ( const std::string &  format,
const Args &...  args 
)
inline
Here is the call graph for this function:

◆ error() [1/2]

template<typename... Args>
void AyonLogger::error ( const std::set< std::string >::iterator &  logginIterator,
const std::string &  format,
const Args &...  args 
)
inline
Here is the call graph for this function:

◆ error() [2/2]

template<typename... Args>
void AyonLogger::error ( const std::string &  format,
const Args &...  args 
)
inline
Here is the call graph for this function:

◆ getInstance()

static AyonLogger & AyonLogger::getInstance ( const std::string &  filepath)
inlinestatic
Here is the caller graph for this function:

◆ info() [1/2]

template<typename... Args>
void AyonLogger::info ( const std::set< std::string >::iterator &  logginIterator,
const std::string &  format,
const Args &...  args 
)
inline
Here is the call graph for this function:

◆ info() [2/2]

template<typename... Args>
void AyonLogger::info ( const std::string &  format,
const Args &...  args 
)
inline
Here is the call graph for this function:

◆ isKeyActive()

bool AyonLogger::isKeyActive ( const std::set< std::string >::iterator &  logginIterator)
inline

◆ key()

std::set< std::string >::iterator AyonLogger::key ( const std::string &  key)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ log()

template<typename... Args>
void AyonLogger::log ( const std::string &  level,
const std::string &  massage,
const Args &...  args 
)
inlineprivate
Here is the caller graph for this function:

◆ LogLevlCritical()

void AyonLogger::LogLevlCritical ( const bool &  alsoSetFileLogger = false)
inline

◆ LogLevlError()

void AyonLogger::LogLevlError ( const bool &  alsoSetFileLogger = false)
inline

◆ LogLevlInfo()

void AyonLogger::LogLevlInfo ( const bool &  alsoSetFileLogger = false)
inline

◆ LogLevlOff()

void AyonLogger::LogLevlOff ( const bool &  alsoSetFileLogger = false)
inline

◆ LogLevlWarn()

void AyonLogger::LogLevlWarn ( const bool &  alsoSetFileLogger = false)
inline

◆ regesterLoggingKey()

bool AyonLogger::regesterLoggingKey ( const std::string &  KeyName)
inline

◆ unregisterLoggingKey()

bool AyonLogger::unregisterLoggingKey ( const std::string &  KeyName)
inline

◆ warn() [1/2]

template<typename... Args>
void AyonLogger::warn ( const std::set< std::string >::iterator &  logginIterator,
const std::string &  format,
const Args &...  args 
)
inline
Here is the call graph for this function:

◆ warn() [2/2]

template<typename... Args>
void AyonLogger::warn ( const std::string &  format,
const Args &...  args 
)
inline
Here is the call graph for this function:

Member Data Documentation

◆ console_logger_

std::shared_ptr<spdlog::logger> AyonLogger::console_logger_
private

◆ EnabledLoggingKeys

std::set<std::string> AyonLogger::EnabledLoggingKeys
private

◆ enableFileLogging

bool AyonLogger::enableFileLogging
private

◆ file_logger_

std::shared_ptr<spdlog::logger> AyonLogger::file_logger_
private

◆ fileLoggerFilePath

std::string AyonLogger::fileLoggerFilePath
private

◆ fileLoggerFilePathOverwrite

bool AyonLogger::fileLoggerFilePathOverwrite
private

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