File logger example
void ConfigureLogger()
{
auto sink = std::make_shared<CppLogging::Processor>(std::make_shared<CppLogging::BinaryLayout>());
sink->appenders().push_back(std::make_shared<CppLogging::FileAppender>("file.bin.log"));
}
int main(int argc, char** argv)
{
ConfigureLogger();
logger.Debug("Debug message {}", 1);
logger.Info("Info message {}", 2);
logger.Warn("Warning message {}", 3);
logger.Error("Error message {}", 4);
logger.Fatal("Fatal message {}", 5);
return 0;
}
static void ConfigLogger(const std::shared_ptr< Processor > &sink)
Configure default logger with a given logging sink processor.
static void Startup()
Startup the logging infrastructure.
Logger configuration definition.
Logger interface definition.