← Back

ofxXcodeColoredLogger

github.com/YoshitoONISHI/ofxXcodeColoredLogger · @YoshitoONISHI
OF 0.8 Utilities

colorize ofLog output on XCode4

5 0 Last commit 13y ago Created 13y ago

README

ofxXcodeColoredLogger



install



1. Close XCode. 2. Run ./install.sh or manually move XcodeColors.xcplugin to your ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins directory.

XcodeColors

exmaple



#include "ofxXCodeColoredLoggerChannel.h"

int main() { // setup ofxXCodeColoredLogger ofSetLoggerChannel(ofxXCodeColoredLoggerChannel::create()); ofSetLogLevel(OF_LOG_VERBOSE); // automatically colored log ofLogVerbose("test") << PRETTY_FUNCTION << " Verbose"; ofLogNotice("test") << PRETTY_FUNCTION << " Notice"; ofLogWarning("test") << PRETTY_FUNCTION << " Warning"; ofLogError("test") << PRETTY_FUNCTION << " Error"; // custom color ofPtr<ofxXCodeColoredLoggerChannel> channel = ofxXCodeColoredLoggerChannel::create(); channel->setColor(OF_LOG_VERBOSE, ofColor::darkTurquoise); channel->setColor(OF_LOG_NOTICE, ofColor::dodgerBlue); channel->setColor(OF_LOG_WARNING, ofColor::goldenRod); channel->setColor(OF_LOG_ERROR, ofColor::fireBrick); ofSetLoggerChannel(channel); ofLogVerbose("test") << PRETTY_FUNCTION << " Verbose"; ofLogNotice("test") << PRETTY_FUNCTION << " Notice"; ofLogWarning("test") << PRETTY_FUNCTION << " Warning"; ofLogError("test") << PRETTY_FUNCTION << " Error"; }

screenshot





Get this addon

HTTPS
SSH