Skip to content

DHANUSH-web/cpp-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Logger - A Utility C++ program for logging events and program flow

A Logger header-only program written in C++ with a class-based design to handle events and program flow in your application without worrying about the biggest headache of debugging an issue from multiple program files. CppLogger allows you to manage any number of logger instances across your entire project for easy access to different module level loggers via the Buffer Manager (BUF_MANAGER).

In simple words, CppLogger is not a shared or compiled library—it is a lightweight, powerful, and flexible logging header program for C++ programs or applications.

Features

  • 🚀 Fully customizable and adaptable API to meet specific requirements
  • ⚡ High-performance logging capabilities
  • 🎨 Shared logger instances across the entire project using Buffer Manager (BUF_MANAGER)
  • 🎯 Multiple logger instances in the same runtime
  • 🔍 Multiple logging levels (DEBUG, INFO, WARNING, ERROR, FATAL, MESSAGE, UNKNOWN)
  • 🎨 Colored console output and configurable log levels

Usage

Clone the repo directly from https://github.com/DHANUSH-web/cpp-logger.git into your project anywhere

For stable release

git clone https://github.com/DHANUSH-web/cpp-logger.git

For development release

git clone -b dev https://github.com/DHANUSH-web/cpp-logger.git

If you are using CMake as build-system in your project, don't forget to include the logger inside CMakeLists.txt

include_directories(".")
add_executable(your_target your_source.cpp
    logger.h
    manager.h
)

Note: You can also run a demo program inside the logger main.cpp by running the build script.

Windows — In the terminal, run:

./build.bat

This builds the project and runs the demo executable.

Linux / macOS — Use the build script with one of the following commands:

Command Description
./build run Build and run the demo (default: debug). Use ./build run --release for release.
./build build Build only (default: debug). Use --release for release or --all for both.
./build clean Remove build output. Use --debug or --release to clean one variant, or no option to clean all.
./build help Show ./build usage.

Examples:

./build run              # build and run (debug)
./build run --release    # build and run (release)
./build build --all      # build debug and release
./build clean            # clean all build directories
./build help             # helper command

Quick Start

Open main.cpp file inside the logger and try to explore the code.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for more details.

Developer

CppLogger is purely written in C++ developed by DHANUSH H V

About

A Logger library written in C++ for better memory management and efficiency in collecting application logs without impacting your application performance

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors