Latest 0.1.0
Homepage https://github.com/MaxKramer/Timber
License MIT
Platforms ios 8.0
Authors

Timber

File-based logging framework written in Swift

Build Status
codecov

Version
License
Platform

Usage

Logger.registerMinLevel(.Error) // Set the log-level for the current file if needed

Logger.debug("I'm trying to debug something") // Log something!
Logger.error("TIFU (some_error)")
Logger.info("TIFU (some_error)")
// etc...

TODO:

  • Cocoapods, Carthage, and Swift PM integration
  • Log to file(s) including log rotation
  • Colours!!!
  • Clean up

Log Levels

As mentioned in Logger+LogLevels.swift, we uniformly use the same log priorities as Apache’s log4j. The is as follows:

ALL < DEBUG < TRACE < INFO < WARN < ERROR < FATAL < OFF.

Therefore, a log request of level p in a logger with level q is enabled if p >= q.

Level Description
ALL All levels including custom levels.
DEBUG Designates fine-grained informational events that are most useful to debug an application.
ERROR Designates error events that might still allow the application to continue running.
FATAL Designates very severe error events that will presumably lead the application to abort.
INFO Designates informational messages that highlight the progress of the application at coarse-grained level.
OFF The highest possible rank and is intended to turn off logging.
TRACE Designates finer-grained informational events than the DEBUG.
WARN Designates potentially harmful situations.

Visually:

visual log levels
Stolen from Log4j’s architecture page.

Latest podspec

{
    "name": "TimberSwift",
    "version": "0.1.0",
    "summary": "A file-based logging framework written in Swift",
    "description": "Timber is a file-based logging framework written in Swift",
    "homepage": "https://github.com/MaxKramer/Timber",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Max Kramer": "[email protected]"
    },
    "source": {
        "git": "https://github.com/MaxKramer/Timber.git",
        "tag": "0.1.0"
    },
    "social_media_url": "https://twitter.com/MaxKramer",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Timber/Classes/**/*"
}

Pin It on Pinterest

Share This