Skip to content

Commit

Permalink
Add dependency injection category to LogKit
Browse files Browse the repository at this point in the history
  • Loading branch information
marekpridal committed Apr 1, 2023
1 parent 5615836 commit 69c61dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Sources/LogKit/LogKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public enum Log {
case inAppPurchase
case error
case database
case dependencyInjection
}

public static var subsystem = Bundle.main.bundleIdentifier!
Expand Down Expand Up @@ -115,6 +116,12 @@ public enum Log {
os_log("%{PRIVATE}@", log: log, type: .debug, string)
}

public static func dependencyInjection(_ string: String) {
guard enabledLogging.contains(.dependencyInjection) else { return }
let log = OSLog(subsystem: subsystem, category: LogKit.Log.Category.dependencyInjection.rawValue)
os_log("%{PRIVATE}@", log: log, type: .debug, string)
}

@available(watchOS 6.2, *)
public static func products(request: SKProductsRequest) {
guard enabledLogging.contains(.inAppPurchase) else { return }
Expand Down

0 comments on commit 69c61dc

Please sign in to comment.