Skip to content
CinderBlock for considered logging via Boost.Log v2
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/macosx
src
.gitignore
README.md
cinderblock.xml

README.md

Cinder-Logger

Cinder-Logger is a CinderBlock to more carefully control logging via Boost.Log v2. Binaries are provided to support OS X and the block is designed for use with the 0.8.6 of Cinder.

NOTE the heir apparent Cinder branch, glNext includes Log.h which should be used instead of Cinder-Logger, it does not rely so heavily on Boost and has a much more rich feature set - you might even consider using a backported version if you are still running Cinder-0.8.6.

EXAMPLE

void LumberjackApp::setup() {
    mLogger = Logger::create();
    fs::path path = expandPath("~/Desktop/lumberjack.log");
    mLogger->setLogFilePath(path);
    mLogger->setSeverityLevel(Logger::SeverityLevel::Debug);
}

void LumberjackApp::shutdown() {
    mLogger->logFatal("💀");
}

void LumberjackApp::keyDown(KeyEvent event) {
    mLogger->logMessage(Logger::SeverityLevel::Debug, "key code: " + toString(event.getCode()));
}

void LumberjackApp::mouseDown(MouseEvent event) {
    // ignored as the severity level is lower than the threshold
    mLogger->logMessage(Logger::SeverityLevel::Trace, "LumberjackApp::mouseDown");
}
You can’t perform that action at this time.