Skip to content

kubbing/Necrolog

Repository files navigation

💀 Necrolog 💀

Killer Swift debug log library for iOS.

Imgur

Installation

pod 'Necrolog', :git => 'https://github.com/kubbing/Necrolog'

Usage (Swift)

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" ]))

Usage (Objective-C)

@import Necrolog;

[Necrolog setupWithInitialTimeInterval:CACurrentMediaTime()
                              logLevel:LogLevelDebug
                     splitMultipleArgs:NO
                       logCodeLocation:YES
                            withColors:YES];

Extras

Color support using XcodeColors, install using Alcatraz package manager. Enable using withColors: true in Necrolog's setup(…)

FAQ

  1. Yet another logging library?

    Yes.

  2. Why?

    Because fuck you! Thats why.

  3. Why there are no asserts in your unit tests?

    Ditto.

Licence

Beerware

About

Killer Swift debug log library for iOS.

Resources

License

Stars

Watchers

Forks

Packages

No packages published