Skip to content

masonlet/starlet-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Starlet Logger

Tests C++20 License: MIT

A lightweight logging utility for C++ applications.

Features

  • Four log levels: Info, Debug, Warning, Error
  • Automatic stream routing (stdout for info/debug, stderror for warnings/errors)
  • Caller, function, and msg context in every log message
  • Debug logs compiled out in release builds (NDEBUG)
  • Custom warning return value for permissible warnings

Prerequisites

  • C++17 or later
  • CMake 3.20+

Using as a Dependency

include(FetchContent)

FetchContent_Declare(starlet_logger
  GIT_REPOSITORY https://github.com/masonlet/starlet-logger.git 
  GIT_TAG main
)
FetchContent_MakeAvailable(starlet_logger)

target_link_libraries(app_name PRIVATE starlet_logger)

Building and Testing

# 1. Clone starlet-logger
git clone https://github.com/masonlet/starlet-logger.git
cd starlet-logger

# 2. Create a build directory and generate build files
mkdir build
cd build
cmake -DBUILD_TESTS=ON ..

# 3. Build and run tests
cmake --build .
ctest

License

MIT License - see LICENSE for details.

About

Lightweight logging utility for Starlet projects

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published