log4cxx

C++ library for flexible and configurable logging in applications

brewmacoslinux
Try with needOr install directly
Source

About

Library of C++ classes for flexible logging

Commands

log4cxx

Examples

Include log4cxx headers in C++ code for basic logging setup$ g++ -I/usr/local/include -L/usr/local/lib -llog4cxx myapp.cpp -o myapp
Configure logging with properties file in your C++ application$ PropertyConfigurator::configure("log4cxx.properties");
Create logger instance and log messages at different levels$ LOG4CXX_INFO(logger, "Application started"); LOG4CXX_ERROR(logger, "Error occurred");