Created
July 19, 2011 11:04
-
-
Save marcin-maciukiewicz/1091990 to your computer and use it in GitHub Desktop.
Minimal Log4Cocoa stup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// log every category | |
[[L4Logger rootLogger] setLevel:[L4Level all]]; | |
// send log messages to console | |
L4ConsoleAppender *consoleAppender=[[[L4ConsoleAppender alloc] initTarget:YES withLayout: [L4Layout simpleLayout]] autorelease]; | |
[[L4Logger rootLogger] addAppender: consoleAppender]; | |
L4Logger *theLogger = [L4Logger loggerForClass:[L4FunctionLogger class]]; | |
[theLogger setLevel:[L4Level debug]]; | |
// | |
log4Info(@"The logging system has been initialized."); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment