Skip to content
This repository was archived by the owner on Dec 14, 2025. It is now read-only.
/ Logger Public archive

A simple and thread-safe logging header library for C++ applications.

License

Notifications You must be signed in to change notification settings

The-Krew/Logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logger (Unix-Only)

A lightweight, header-only C++ logging library.
Easily integrate structured, leveled logging into your C++ projects with minimal setup.

Features

  • Header-only: Just include the header file and start logging.
  • Log Levels: Support for multiple log levels (e.g., INFO, WARNING, ERROR, DEBUG).
  • Configurable Output: Customize output format and destination (console, file, etc.).
  • Simple API: Intuitive and minimalistic usage.
  • No dependencies: Pure standard C++.

Installation

Minimal version needed: C++20 (for std::format support), but for 100% compatibility, C++23 is recommended.

Copy the header file (logger.hpp) from the include/ directory into your project. Or add this repository as a submodule and include the header:

#include "include/logger.hpp"

Usage

Simple example:

#include "include/logger.hpp"

int main() {
    int code = 42;
    Log::infoln("This is an info message!");
    Log::errorf("This is an error message! {}", code);
    // Add more examples as needed
}

Output:

example

For advanced configuration, see the code comments and examples directory.

Examples

See the examples/ directory for more usage patterns.

License

Distributed under the MIT License. See LICENSE for more information.

Contributing

Contributions, issues, and feature requests are welcome!
Feel free to open an issue or submit a pull request.

Author

KopyTKG

About

A simple and thread-safe logging header library for C++ applications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors