https://github.com/justcabbage/clog
Logging System for C++20 Applications
https://github.com/justcabbage/clog
cpp logger logging
Last synced: about 13 hours ago
JSON representation
Logging System for C++20 Applications
- Host: GitHub
- URL: https://github.com/justcabbage/clog
- Owner: JustCabbage
- Created: 2024-04-12T19:33:32.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-12T19:33:49.000Z (about 2 years ago)
- Last Synced: 2025-03-21T11:30:56.573Z (over 1 year ago)
- Language: C++
- Size: 15.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CLOG [](https://lbesson.mit-license.org/)
# What is CLOG?
CLOG is a relatively basic logging implementation for debugging in applications.
# Features
- RGB Based Theme
- Customizable Logging options
- Timestamp Logging
- Date Logging
- Thread Safe
# Options
- Default - Everything Enabled
- NoTimestamps - Disable Timestamp Prefix
- NoColor - No Displayed Color | Ignores any color provided
- NoDate - Disable Date Prefix
# Examples
## Note
Initialization of CLOG is Required. Without doing so, the library may not function as intended.
## Standard Logging
```c++
CLOG::Logger::Initialize(CLOG::Colors::Color(255,255,255));
CLOG::Logger::Info("Information");
```
## Warning
```c++
CLOG::Logger::Initialize(CLOG::Colors::Color(255,255,255));
CLOG::Logger::Info("Warning");
```
## Error
```c++
CLOG::Logger::Initialize(CLOG::Colors::Color(255,255,255));
CLOG::Logger::Error("Error");
```
## Single Option Initialization
```c++
CLOG::Logger::Initialize(CLOG::Colors::Color(255,255,255), CLOG::Settings::LoggerOptions_NoDate);
```
## Multiple Options Initialization
```c++
CLOG::Logger::Initialize(CLOG::Colors::Color(255,255,255), CLOG::Settings::LoggerOptions_NoDate | CLOG::Settings::LoggerOptions_NoTimestamps);
```
## Update Colors
```c++
CLOG::Logger::Initialize(CLOG::Colors::Color(255,255,255));
CLOG::Logger::Info("Information");
CLOG::Logger::UpdateColor(CLOG::Logger::LogType_INFO,CLOG::Colors::Color(255,0,0));
CLOG::Logger::Info("Red");
```
# To Do
- Add Log Levels
- Add More Log Types
- Add Ability To Update Logger Options