Skip to content

Logger

#include "Logger/Logger.h"

Public Functions

Name
Logger(const Logger & ) =delete
Logger(Logger && ) =delete
voidaddToLogBuffer(const LoggingOption & logType, const std::string & message, const std::vector< std::string > & args)
voidendLogger() const
std::shared_ptr< spdlog::logger >getAppLogger()
std::ostringstream &getBuffer()
std::stringgetLogString(const std::string & key) const
voidinitLogger(int argc, char * argv[])
template <typename... Args&gt; <br>voidlog(const LoggingOption & logType, const std::string & message, Args &&... args)
Logger &operator=(const Logger & ) =delete
voidupdate()
Logger &getInstance()<br>Logger class is a singleton.

Public Functions Documentation

function Logger

cpp
Logger(
    const Logger & 
) =delete
Logger(
    const Logger & 
) =delete

function Logger

cpp
Logger(
    Logger && 
) =delete
Logger(
    Logger && 
) =delete

function addToLogBuffer

cpp
void addToLogBuffer(
    const LoggingOption & logType,
    const std::string & message,
    const std::vector< std::string > & args
)
void addToLogBuffer(
    const LoggingOption & logType,
    const std::string & message,
    const std::vector< std::string > & args
)

function endLogger

cpp
void endLogger() const
void endLogger() const

function getAppLogger

cpp
inline std::shared_ptr< spdlog::logger > getAppLogger()
inline std::shared_ptr< spdlog::logger > getAppLogger()

function getBuffer

cpp
inline std::ostringstream & getBuffer()
inline std::ostringstream & getBuffer()

function getLogString

cpp
std::string getLogString(
    const std::string & key
) const
std::string getLogString(
    const std::string & key
) const

function initLogger

cpp
void initLogger(
    int argc,
    char * argv[]
)
void initLogger(
    int argc,
    char * argv[]
)

function log

cpp
template <typename... Args>
void log(
    const LoggingOption & logType,
    const std::string & message,
    Args &&... args
)
template <typename... Args>
void log(
    const LoggingOption & logType,
    const std::string & message,
    Args &&... args
)

function operator=

cpp
Logger & operator=(
    const Logger & 
) =delete
Logger & operator=(
    const Logger & 
) =delete

function update

cpp
void update()
void update()

function getInstance

cpp
static Logger & getInstance()
static Logger & getInstance()

Logger class is a singleton.

Return: Logger instance.


Updated on 2024-11-06 at 20:16:53 +0000