I am using xcodebuild to test my application in CI. I invoke it like this:
xcodebuild test -project myapp.xcodeproj -scheme myappTests -destination 'platform=iOS Simulator,name=iPhone 8,OS=14.4'
Text logged with the Logger from OSLog are not shown in debug level. So if I have something like this in my test, it isn't shown in the output of xcodebuild, but I would like to see that:
Logger(subsystem: "a", category: "b").debug("something")
Can I set the logging level of xcodebuild to debug? Messages with error level are shown.
I tried setting xcodebuildDebugLogLevel=3 but that gave me the same logging information.
Logger doesn't print
debug(andtrace) messages to the output because a log level of your subsystem on your simulator isINFO.You can check this with next steps:
To change the current log level to
DEBUGyou can use next command:Check again:
Now your tests with
xcodebuildmust have all debug (and trace) messages in the output.