mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-18 11:13:28 +01:00
OSLog+SideStore fix staticstring
Signed-off-by: Joseph Mattello <mail@joemattiello.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import Foundation
|
|||||||
import OSLog
|
import OSLog
|
||||||
|
|
||||||
let customLog = OSLog(subsystem: "org.sidestore.sidestore",
|
let customLog = OSLog(subsystem: "org.sidestore.sidestore",
|
||||||
category: "ios")
|
category: "ios")
|
||||||
|
|
||||||
|
|
||||||
public extension OSLog {
|
public extension OSLog {
|
||||||
@@ -39,11 +39,13 @@ public extension OSLog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Add file,line,function to messages? -- @JoeMatt
|
||||||
|
|
||||||
/// Error logger convenience method for SideStore logging
|
/// Error logger convenience method for SideStore logging
|
||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - message: String or format string
|
/// - message: String or format string
|
||||||
/// - args: optional args for format string
|
/// - args: optional args for format string
|
||||||
public func ELOG(_ message: StaticString, _ args: CVarArg...) {
|
public func ELOG(_ message: StaticString, file: StaticString = #file, function: StaticString = #function, line: UInt = #line, _ args: CVarArg...) {
|
||||||
OSLog.error(message, args)
|
OSLog.error(message, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,15 +53,17 @@ public func ELOG(_ message: StaticString, _ args: CVarArg...) {
|
|||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - message: String or format string
|
/// - message: String or format string
|
||||||
/// - args: optional args for format string
|
/// - args: optional args for format string
|
||||||
public func ILOG(_ message: StaticString, _ args: CVarArg...) {
|
public func ILOG(_ message: StaticString, file: StaticString = #file, function: StaticString = #function, line: UInt = #line, _ args: CVarArg...) {
|
||||||
OSLog.info(message, args)
|
OSLog.info(message, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Debug logger convenience method for SideStore logging
|
/// Debug logger convenience method for SideStore logging
|
||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - message: String or format string
|
/// - message: String or format string
|
||||||
/// - args: optional args for format string
|
/// - args: optional args for format string
|
||||||
public func DLOG(_ message: StaticString, _ args: CVarArg...) {
|
@inlinable
|
||||||
|
public func DLOG(_ message: StaticString, file: StaticString = #file, function: StaticString = #function, line: UInt = #line, _ args: CVarArg...) {
|
||||||
OSLog.debug(message, args)
|
OSLog.debug(message, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// mark: Helpers
|
||||||
|
|||||||
Reference in New Issue
Block a user