TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Nov 2015 |
Maintained by Giovanni Lodi.
Depends on: | |
Antenna | ~> 2.0 |
CocoaLumberjack | ~> 2.0 |
CocoaLumberjack Custom Logger for Remote Logging with Antenna
The easiest way to leverage on logging power of CocoaLumberjack and logging remotely with the simplicity of Antenna.
pod 'DDAntennaLogger', '1.0.0'
Somewhere, for example in your AppDelegate
:
NSString *yourServerURLString = @"...";
NSString *yourServerLogMethod = @"..."; // Could be POST or LOG, or any other supported by your server
[[Antenna sharedLogger] addChannelWithURL:[NSURL URLWithString:yourServerURLString] method:yourServerLogMethod];
[[Antenna sharedLogger] startLoggingApplicationLifecycleNotifications];
DDAntennaLogger *logger = [[DDAntennaLogger alloc] initWithAntenna:[Antenna sharedLogger]];
[DDLog addLogger:logger];
DDLogInfo(@"DDAntennaLogger is cool!");
// => You'll see "DDAntennaLogger is cool!" on your server :)
It's that easy
You may also want to checkout this post to read about a real world used of DDAntennaLogger.
This project was after a quick conversation between @sandfoxuk and me, to solve the need of BIZZBY to get deep insight on the code execution while trying to solve a nasty bug.
MIT