Swift Package Index


Really lightweight logger for your CLI app


  • The latest stable release is 0.2.3. Released over 1 year ago.
  • The last commit to master was over 1 year ago.

Swift Version Compatibility

  • 0.2.3 and master
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 0.2.3
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
  • master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

Logger

Really lightweight logger for your CLI app

Installing

Use SPM to install logger

let package = Package(
    name: "danger-swift",
    ...
    dependencies: [
      .package(url: "https://github.com/f-meloni/Logger", from: "0.1.0"),
    ],
    ...
)

Use Logger

Logger offers you different functions dipending on the type of log you want to use.

Some examples:

let logger = Logger()

// prints:
// Message 1 Message 2
logger.debug("Message 1", "Message 2")

// prints:
// Message 1 
// Message 2
logger.logInfo("Message 1", "Message 2", separator: "\n")

// prints: 
// WARNING: WarningMessage!
logger.logWarning("WarningMessage", terminator: "!")

// prints:
// ERROR: ErrorMessage
logger.logError("ErrorMessage")