header only C++ logging library
for stream to file
Logger<wchar_t>::log_output_set(L"log/log.txt");
for stream to console no need to call log_output_set function. Stream to console as default.
void log_priority_set(LogPriority t_logPriority);
log_priority_set : Logger severity upper limit. All log messages have its own severity and if it is higher than the limit those messages are dropped.
Logger<wchar_t>::log_priority_set(LogPriority::Debug);
Create an singleton instance,, which ensures that only one object of its kind exists and provides a single point
auto log = Logger<char>::get_instance();
Formatters specify the layout of log records in the final output.
log->formatter_set("%m %t");
%m : message , %t : time
`
The File size limit property of the File field enables you to set size limits on the file, in byte.
log->file_limit_set(100);
Logs a message with log priority level. The other arguments are interpreted as variadic arguments.
log->log(LogPriority::Error, "Lorem ipsum", "tellus felis condimentum odio, : "
Logger<char>::log_output_set("log/log.txt");
Logger<char>::log_priority_set(LogPriority::Debug);
auto log = Logger<char>::get_instance();
log->file_limit_set(100);
log->formatter_set("%t %m");
log->log(LogPriority::Error, __LINE__, __FILE__, "tellus felis condimentum odio, : " );