I'm using the following helper method with OS_Log, but I'm not sure if it's necessary.
I want to log things in my Debug builds, but not(necessarily) in my Release builds.
I'm confused as to whether the compiler removes os_log statements in Release builds
public func DLog(_ string: String, subsystem: OSLog, type: OSLogType) {
#if DEBUG
os_log("%{PUBLIC}@", log: subsystem, type: type, string)
#endif
}
Could I just use it directly and logs are stripped for Release builds?
os_log("%{PUBLIC}@", log: subsystem, type: type, string)
I'm confused...