spdlog

Super fast C++ logging library with header-only and compiled options

brewmacoslinux
Try with needOr install directly
Source

About

Super fast C++ logging library

Commands

spdlog

Examples

Include spdlog in C++ project for basic logging$ #include <spdlog/spdlog.h> spdlog::info("Hello, {}!", "World");
Create rotating file logger with spdlog$ auto max_size = 1024 * 1024 * 10; // 10MB auto max_files = 3; auto logger = spdlog::rotating_logger_mt("mylogger", "logs/mylog.txt", max_size, max_files);
Set logging level and format$ spdlog::set_level(spdlog::level::debug); spdlog::set_pattern("[%H:%M:%S %z] [%n] [%^%L%$] %v"); spdlog::debug("Debug message");