Actually, OSLogPreference isn't behaving as expected when on the device either.
From what I can tell Level in OSLogPreference only seems to affect the logs if they are labeled "Off". Default, Info, and debug do not seem to have the desired effect.
So in a fresh project I added these log lines:
let offLog = Logger(subsystem: sub, category: "offLog")
let debugLog = Logger(subsystem: sub, category: "debugLog")
let infoLog = Logger(subsystem: sub, category: "infoLog")
let defaultLog = Logger(subsystem: sub, category: "defaultLog")
let unsetLog = Logger(subsystem: sub, category: "unsetLog")
offLog.debug("1: offLog.debug")
debugLog.debug("2: debugLog.debug")
infoLog.debug("3: infoLog.debug")
defaultLog.debug("4: defaultLog.debug")
unsetLog.debug("5: unsetLog.debug")
offLog.info("1: offLog.info")
debugLog.info("2: debugLog.info")
infoLog.info("3: infoLog.info")
defaultLog.info("4: defaultLog.info")
unsetLog.info("5: unsetLog.info")
offLog.notice("1: offLog.notice")
debugLog.notice("2: debugLog.notice")
infoLog.notice("3: infoLog.notice")
defaultLog.notice("4: defaultLog.notice")
unsetLog.notice("5: unsetLog.notice")
offLog.error("1: offLog.error")
debugLog.error("2: debugLog.error")
infoLog.error("3: infoLog.error")
defaultLog.error("4: defaultLog.error")
unsetLog.error("5: unsetLog.error")
With this pList
Xcode always outputs all of the logs. and console only removes the logs from "offLog"
Xcode:
Console
Seems like a bug?