Killer Swift debug log library for iOS.
pod 'Necrolog', :git => 'https://github.com/kubbing/Necrolog'
import Necrolog
Necrolog.setup()
Necrolog.setup(
withInitialTimeInterval: CACurrentMediaTime(), // set time0 for deltas, optional
logLevel: .Verbose, // (default .Debug)
splitMultipleArgs: true, // newlines between args (false)
logCodeLocation: false, // append file function:line (true)
withColors: true) // colorize output (false)
Necrolog.verbose("verbose test 1 arg")
Necrolog.debug("debug test 1 arg")
Necrolog.info("info test 1 arg")
Necrolog.warning("warning test 1 arg")
Necrolog.error("error test 1 arg")
Necrolog.verbose("verbose test", "2 args")
Necrolog.debug("debug test", "2 args")
Necrolog.info("info test", "2 args")
Necrolog.warning("warning test", "2 args")
Necrolog.error("error test", "2 args")
Necrolog.verbose("verbose test", 2, 3)
Necrolog.debug("debug test", [ 2, 3 ])
Necrolog.info("info test", [ 2 : 3 ])
Necrolog.warning("warning test", [ "key1" : "obj1", "key2" : "obj2" ])
Necrolog.error("error test", NSError(domain: "Necrolog", code: 1, userInfo: [ "description" : "test error description" ]))
@import Necrolog;
[Necrolog setupWithInitialTimeInterval:CACurrentMediaTime()
logLevel:LogLevelDebug
splitMultipleArgs:NO
logCodeLocation:YES
withColors:YES];
Color support using XcodeColors, install using Alcatraz package manager. Enable using withColors: true
in Necrolog
's setup(…)
-
Yet another logging library?
Yes.
-
Why?
Because fuck you! Thats why.
-
Why there are no asserts in your unit tests?
Ditto.