CocoaLumberjack is probably the best logging system for iOS and OS X systems. With it's asynchronous logging, log levels and support for XcodeColors it's the ultimate solution for most projects.
UIForLumberjack is the iOS UI library to display CocoaLumberjack logs on iOS device.
Install from cocoapods:
or just drag&drop
UIForLumberjack.m to your project.
In your code all you have to do is to add a new logger:
[DDLog addLogger:[UIForLumberjack sharedInstance]];
and then just use generated UITableView with logs by adding it to whatever view you like:
[[UIForLumberjack sharedInstance] showLogInView:self.view];
UIForLumberjack uses autolayout to fill whole parent view, so you can easily configure it to be a fullscreen console:
or just occupy small view:
After selecting row (method
tableView:didSelectRowAtIndexPath:) log text changes to show you filename, selector and line from which log was called:
UITableView section header contains green button
Hide Log which performs
removeFromSuperview action when tapped, so you can easily hide log view when not needed.
I was inspired by LumberjackConsole but when I tried to use it it had some issues with screen rotation and showed it's own status bar below system Status Bar which my client didn't want. My implementation is very simple (2 files total and just 177 lines in
.m file!) but if you need more advanced solution you should definitely check LumberjackConsole.
UIForLumberjackExample to see how it works although it is really that simple :)
UIForLumberjack is available under the MIT license. See the LICENSE file for more info.