From 36ad2a720fdc90ce2ef8185104f4ab011b79eb6f Mon Sep 17 00:00:00 2001 From: Joseph Mattello Date: Wed, 4 Jan 2023 09:31:51 -0500 Subject: [PATCH] log functions inlineable Signed-off-by: Joseph Mattello --- AltStore/Extensions/OSLog+SideStore.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/AltStore/Extensions/OSLog+SideStore.swift b/AltStore/Extensions/OSLog+SideStore.swift index 73fb7c0e..0cb11525 100644 --- a/AltStore/Extensions/OSLog+SideStore.swift +++ b/AltStore/Extensions/OSLog+SideStore.swift @@ -9,7 +9,7 @@ import Foundation import OSLog -let customLog = OSLog(subsystem: "org.sidestore.sidestore", +public let customLog = OSLog(subsystem: "org.sidestore.sidestore", category: "ios") @@ -18,6 +18,7 @@ public extension OSLog { /// - Parameters: /// - message: String or format string /// - args: optional args for format string + @inlinable static func error(_ message: StaticString, _ args: CVarArg...) { os_log(message, log: customLog, type: .error, args) } @@ -26,6 +27,7 @@ public extension OSLog { /// - Parameters: /// - message: String or format string /// - args: optional args for format string + @inlinable static func info(_ message: StaticString, _ args: CVarArg...) { os_log(message, log: customLog, type: .info, args) } @@ -34,6 +36,7 @@ public extension OSLog { /// - Parameters: /// - message: String or format string /// - args: optional args for format string + @inlinable static func debug(_ message: StaticString, _ args: CVarArg...) { os_log(message, log: customLog, type: .debug, args) } @@ -45,6 +48,7 @@ public extension OSLog { /// - Parameters: /// - message: String or format string /// - args: optional args for format string +@inlinable public func ELOG(_ message: StaticString, file: StaticString = #file, function: StaticString = #function, line: UInt = #line, _ args: CVarArg...) { OSLog.error(message, args) } @@ -53,6 +57,7 @@ public func ELOG(_ message: StaticString, file: StaticString = #file, function: /// - Parameters: /// - message: String or format string /// - args: optional args for format string +@inlinable public func ILOG(_ message: StaticString, file: StaticString = #file, function: StaticString = #function, line: UInt = #line, _ args: CVarArg...) { OSLog.info(message, args) }