https://github.com/dheovani/logger
Classe de logs para C++
https://github.com/dheovani/logger
cmake cmakelists cpp cpp-logger cpp20 logger logging-library
Last synced: 17 days ago
JSON representation
Classe de logs para C++
- Host: GitHub
- URL: https://github.com/dheovani/logger
- Owner: Dheovani
- License: mit
- Created: 2024-05-12T11:30:39.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-14T19:01:40.000Z (over 1 year ago)
- Last Synced: 2025-01-20T07:31:53.064Z (12 months ago)
- Topics: cmake, cmakelists, cpp, cpp-logger, cpp20, logger, logging-library
- Language: C++
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Logger 📝
Logger is a lightweight C++ library for logging messages to various outputs with customizable log levels.
## Features
🔹 Multiple log levels: INFO, DEBUG, TRACE, WARNING and ERROR
🔹 Customize log format and output destination
🔹 Easy integration into existing C++ projects
## Usage
1. Include `Logger.h` in your C++ project.
2. Create an instance of the `Logger` class.
3. Use `<<` operator or any method to log messages at different levels.
```cpp
#include "Logger.hpp"
int main() {
// Macro logging
LOGGER << "Default operation is ERROR";
Logger logger(__FILE__, __LINE__);
logger.Log(LogLevel::INFO, "This is an information message");
logger.Log(LogLevel::ERROR, "Oops! Something went wrong");
return 0;
}
```
## License
This project is licensed under the [MIT License](LICENSE.txt) - see the LICENSE file for details.
Feel free to adjust it according to your preferences or add more details!