24 void _WriteLine(
const std::string& logLevel,
const std::string& msg)
27 std::cout << output << std::endl;
40 void LogTrace(
const std::string& msg)
45 void LogInfo(
const std::string& msg)
50 void LogError(
const std::string& msg)
68 return std::make_unique<ConsoleLoggerImpl>();
static void _WriteLine(const char *loglevel, const char *message)
Send a formatted line to the console.
Declaration of the LoggerHelpers namespace functions used in the Bridge Pattern.
static std::unique_ptr< ILogger > CreateLogger()
Create an instance of a console logger, which writes to the standard output.
Declaration of the ConsoleLogger class used in the Bridge Pattern.
std::string FormatLogLine(const std::string &logLevel, const std::string &msg)
Format a line for logging, including time stamp.
The namespace containing all Design Pattern Examples implemented in C++.
Represents an implementation of a logger object as call from the Logger class.
virtual void LogInfo(const std::string &msg)=0
Log informational messages to the configured output.
virtual void LogTrace(const std::string &msg)=0
Log trace messages to the configured output.
virtual void LogError(const std::string &msg)=0
Log error messages to the configured output.