Custom Formatter for the cocoalumberjack logging framework

9 Sep
2010

Want awesomely fast and flexible logging in your iOS/Cocoa apps? Don’t use NSLog! Use cocoalumberjack.

I’ve written an custom formatter to make it even more awesome. It will give you output like this:

2010-09-09 15:38:58:125(207) [AppDelegate application:didFinishLaunchingWithOptions:/59] app is starting up...

Look again. You get:

  • Log Level (Info is omitted, can be Verbose, Warn, Error)
  • Exact Timestamp
  • Thread ID
  • Class
  • Function Name
  • Line Number (wooot!)
  • Message

Have fun!

Related posts:

  1. Better logging for iOS and Mac: cocoalumberjack
  2. Better iPhone/Mac logging with GTMLogger
  3. Logging, again!
  4. iPhone gaming framework

1 Response to Custom Formatter for the cocoalumberjack logging framework

Avatar

Sohail Ahmed

July 15th, 2011 at 4:24 am

Love it! This kind of control is exactly what I need in my iOS apps to get what log4Cocoa gave me (albeit with weird typedef hacks and categories to get it to work on iOS). Can’t wait to try this out!

Comment Form

top

Switch to our mobile site