Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.32 KB

File metadata and controls

57 lines (42 loc) · 1.32 KB

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.