In my Swift macOS app, I use OSLog logging via the line:
logger.log("••• channel \(channel, format: .octal(minDigits: 3))")
.. and the Xcode console shows:
••• channel 29
.. the formatting to octal and minDigits are ignored. I've searched high and low for why this is happening (another app with the same line results in correct Xcode console output).
The Console.app does show the correct output:
••• channel 035
Any suggestions regarding what I'm not understanding? Thanks.
Good call ..
I removed both IDEPreferLogStreaming and IDELogRedirectionPolicy and logging appears as it should.
A whisper of confusion remains because the culprit is IDEPreferLogStreaming. With only that set to YES the output formatting is defeated. Adding IDELogRedirectionPolicy restored correct formatting; removing both keeps formatting as it should be.
.. no env vars = good
.. both env vars = good
only IDEPreferLogStreaming = bad