SwiftyLogger

SwiftyLogger

I created a simple and flexible logging library in Swift:

GitHub - mtynior/SwiftyLogger: A simple and flexible logging library written in Swift
A simple and flexible logging library written in Swift - GitHub - mtynior/SwiftyLogger: A simple and flexible logging library written in Swift

The main goal was to create a nice and simple API:

import SwiftyLogger

// 1. Create logger
let logger = Logger()
    .addConsole()
    .addFile()
    
// 2. Log messages
logger.logDebug("Debug message")
logger.logVerbose("Verbose message")
logger.logInfo("Info message")
logger.logWarning("Warning message")
logger.logError("Error message")
logger.logFatal("Fatal message")

Although the API is simple, it is quite powerful and extensible. Beside setting basic options like minimal log level, it allows to define custom formatters. Moreover, it can be extended with custom logs destinations.

If you are interested in advanced features, check out documentation on GitHub.


Comments

Anything interesting to share? Write a comment.