Swiftpack.co - janodevorg/Log as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by janodevorg.
janodevorg/Log 1.1.2
Minimal log utility
⭐️ 0
🕓 1 year ago
iOS macOS watchOS tvOS macCatalyst
.package(url: "https://github.com/janodevorg/Log.git", from: "1.1.2")


A simple log utility.


let log = PrintLogger(label: "networking", logLevel: .trace)
log.debug("200 GET https://domain.com/api?1=2")


dependencies: [
    .package(url: "[email protected]:janodevorg/Log.git", from: "1.1.2")
targets: [
        name: "SomeTarget",
        dependencies: [
            .product(name: "DumpLogger", package: "Log")
// ...


[networking] Client.request(resource:co…: 40 · 200 GET https://randomuser.me/api/?results=1&inc=name&seed=abc
[networking]    ReportTests.testFormat():102 · 200 GET https://domain.com/api?1=2
  • It aligns the method name to facilitate visual scanning.
  • It doesn’t print useless elements in the Xcode console, like the full timestamp and project name.
  • It includes a · character you may use in the Xcode console to discard OS_Activity and multiline logs.
  • It logs the output of customDump when the parameter is not a string.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics