A message logging library written in C++ that provides flexible logging capabilities to C++ applications. It allows you to easily log messages of different severity levels, such as Error, Warning, Debug, Trace, and Info, and write them to disk. Currently only for Windows.
- Flexible Logging: You can log messages of different severity levels, making it easier to differentiate between different types of messages.
- Easy to Use Macros: The library provides easy to use macros that simplify the logging process, making it faster and more efficient.
- Multithreading Support: The logger is designed to support multithreading, providing faster performance to your applications.
- Writing to Disk: You can write the log messages to a file, making it easier to review and analyze them at a later time.
To use the Logger in your C++ applicaiton, follow these steps:
- Clone this repository to your local machine.
- Add the "logger.hpp" header to your project.
- Link your project with the "logger.lib" static library.
To build the project using CMake, follow these steps:
- Open a command prompt or terminal window.
- Navigate to the root directory of the project.
- Type
cmake build
and press enter.
Alternatively you can just run the build.bat file and it will do the same.
Note that this requires CMake v3.5 to be installed on your system, so make sure to install CMake before attempting to build.
#include "Logger.hpp"
int main()
{
initialize_logging(); // do initial setup, create log file
LOG_INFO("Application started"); // log to the output
return 0;
}
The Logger is license under the MIT License. See the "LICENSE" file for more information.