mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-14 17:23:25 +01:00
log functions inlineable
Signed-off-by: Joseph Mattello <mail@joemattiello.com>
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import OSLog
|
import OSLog
|
||||||
|
|
||||||
let customLog = OSLog(subsystem: "org.sidestore.sidestore",
|
public let customLog = OSLog(subsystem: "org.sidestore.sidestore",
|
||||||
category: "ios")
|
category: "ios")
|
||||||
|
|
||||||
|
|
||||||
@@ -18,6 +18,7 @@ public extension OSLog {
|
|||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - message: String or format string
|
/// - message: String or format string
|
||||||
/// - args: optional args for format string
|
/// - args: optional args for format string
|
||||||
|
@inlinable
|
||||||
static func error(_ message: StaticString, _ args: CVarArg...) {
|
static func error(_ message: StaticString, _ args: CVarArg...) {
|
||||||
os_log(message, log: customLog, type: .error, args)
|
os_log(message, log: customLog, type: .error, args)
|
||||||
}
|
}
|
||||||
@@ -26,6 +27,7 @@ public extension OSLog {
|
|||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - message: String or format string
|
/// - message: String or format string
|
||||||
/// - args: optional args for format string
|
/// - args: optional args for format string
|
||||||
|
@inlinable
|
||||||
static func info(_ message: StaticString, _ args: CVarArg...) {
|
static func info(_ message: StaticString, _ args: CVarArg...) {
|
||||||
os_log(message, log: customLog, type: .info, args)
|
os_log(message, log: customLog, type: .info, args)
|
||||||
}
|
}
|
||||||
@@ -34,6 +36,7 @@ public extension OSLog {
|
|||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - message: String or format string
|
/// - message: String or format string
|
||||||
/// - args: optional args for format string
|
/// - args: optional args for format string
|
||||||
|
@inlinable
|
||||||
static func debug(_ message: StaticString, _ args: CVarArg...) {
|
static func debug(_ message: StaticString, _ args: CVarArg...) {
|
||||||
os_log(message, log: customLog, type: .debug, args)
|
os_log(message, log: customLog, type: .debug, args)
|
||||||
}
|
}
|
||||||
@@ -45,6 +48,7 @@ public extension OSLog {
|
|||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - message: String or format string
|
/// - message: String or format string
|
||||||
/// - args: optional args for 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...) {
|
public func ELOG(_ message: StaticString, file: StaticString = #file, function: StaticString = #function, line: UInt = #line, _ args: CVarArg...) {
|
||||||
OSLog.error(message, args)
|
OSLog.error(message, args)
|
||||||
}
|
}
|
||||||
@@ -53,6 +57,7 @@ public func ELOG(_ message: StaticString, file: StaticString = #file, function:
|
|||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - message: String or format string
|
/// - message: String or format string
|
||||||
/// - args: optional args for 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...) {
|
public func ILOG(_ message: StaticString, file: StaticString = #file, function: StaticString = #function, line: UInt = #line, _ args: CVarArg...) {
|
||||||
OSLog.info(message, args)
|
OSLog.info(message, args)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user