Logging framework for swift.
- unlimited logger service
- specific output list per service
- specific message filter list per output
- specific message formatter list per output
- extendable almost everything
- hide private data in release builds
Log
: a facade to hide logger logic. You can use this to register, unregister services and logging.
LoggerService
: a protocol to provide a public interface to customize a service.
Output
: a protocol to provide a public interface to customize an output. There are predefined outputs like ConsoleOutput
and RemoteOutput
.
Filter
: a protocol to provide a public interface to define a filter. There is a predefined filter, CategoryFilter
to filter out every log message with the given category.
Formatter
: a protocol to provide a public interface to define a message formatter. There are predefined formatters like PrefixFormatter
and MetaInfoFormatter
.
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. You can add it with Xcode integrated SPM support or manually, with adding this dependency to your Package.swift file:
dependencies: [
.package(url: "https://github.com/team-supercharge/sc-ios-logger.git", .upToNextMinor(from: "1.0.0"))
]
Logger is available under the MIT license. See the LICENSE file for more info.