Skip to content

kamxgal/Log2FileLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Log2FileLib

Simple unsynchronized logger

Example:

Log2File logger(std::filesystem::path("logfile.txt"));
if (!logger.is_open()) {
  std::cerr << "Failed to open log file." << std::endl;
  return 1;
}
logger.debug("This is a debug message with number: ", 42);
logger.info("This is an informational message.");
logger.err("This is an error message with string: ", "Error details.");

Output:

2023-08-24 10:59:56.029 DBG - This is a debug message with number: 42
2023-08-24 10:59:56.030 INF - This is an informational message.
2023-08-24 10:59:56.030 ERR - This is an error message with string: Error details.

About

Simple unsynchronized logger

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published