Console app not showing info and debug logs

I have a Swift 3 Cocoa application that uses Apple's Unified Logging, like this: -


    import os

    class MyClass
    {
        @available(OSX 10.12, *)
        static let scribe = OSLog(subsystem: "com.mycompany.myapp", category: "myapp")

        func SomeFunction(){
  
            if #available(OSX 10.12, *){
                os_log("Test Error Message", log: MyClass.scribe, type: .error)
            }

            if #available(OSX 10.12, *){
                os_log("Test Info Message", log: MyClass.scribe, type: .info)
            }

            if #available(OSX 10.12, *){
                os_log("Test Debug Message", log: MyClass.scribe, type: .debug)
            }
        }
    }



Within the Console application, both

Include Info Messages
and
Include Debug Messages
are turned on.


When

os_log
is called, only the
error
type message is visible in the Console application.

Using Terminal, with the command, all message types are visible in the Terminal output: -


sudo log stream --level debug


I've tried running the Console app as root, via sudo from the command line and the same issue occurs; no debug or info messages can be seen, even though they're set to being turned on under the Action menu.

Setting system-wide logging to be debug, has no effect on the Console application output:

sudo log config --mode level:debug


Please can someone tell me what I'm missing and how can I view debug and info messages in the Console application?

The logs only show up if you use error or fault

That’s not my experience. I just ran this test with the latest beta tooling, to see what the current state of affairs is.

I’m on macOS 13.4.1 running Xcode 15.0b6 targeting its iOS 17.0 (beta) simulator. I created a small test app and wired a button up to this code:

let log = Logger(subsystem: "com.example.apple-samplecode.Test82736", category: "app")

func test() {
    log.debug("debug")
    log.info("info")
    log.log("default")
    log.error("error")
    log.fault("fault")
}

I ran the app from Xcode and clicked the button. Xcode 15 beta’s shiny new logging support showed all my log entries. Yay!

I stopped the app.

I ran the macOS Console app. On the left I selected the iOS 17 beta simulator. I then pasted subsystem:com.example.apple-samplecode.Test82736 into the search box, so I only see my log entries. I also made sure that both Action > Include Info Messages and Action > Include Debug Messages were checked.

In the simulator, I ran the app from the Home screen and clicked my test button.

In Console, I saw all the log entries except for the .debug level one:

type: info
time: 10:48:53.898313+0100
process: Test82736
subsystem: com.example.apple-samplecode.Test82736
category: app
message: info

type: default
time: 10:48:53.898340+0100
process: Test82736
subsystem: com.example.apple-samplecode.Test82736
category: app
message: default

type: error
time: 10:48:53.898355+0100
process: Test82736
subsystem: com.example.apple-samplecode.Test82736
category: app
message: error

type: fault
time: 10:48:53.898421+0100
process: Test82736
subsystem: com.example.apple-samplecode.Test82736
category: app
message: fault

I consider this absence of the .debug level message to be a bug.

I then quit Console and ran the following command in Terminal:

% xcrun simctl spawn booted log stream --debug --predicate 'subsystem == "com.example.apple-samplecode.Test82736"'
…
… Debug   … Test82736: [com.example.apple-samplecode.Test82736:app] debug
… Info    … Test82736: [com.example.apple-samplecode.Test82736:app] info
… Default … Test82736: [com.example.apple-samplecode.Test82736:app] default
… Error   … Test82736: [com.example.apple-samplecode.Test82736:app] error
… Fault   … Test82736: [com.example.apple-samplecode.Test82736:app] fault

IMPORTANT This uses booted, and thus assumes that you only have one simulator running.

As you can see, this shows all the log entries.


So, in summary, this seems to be working pretty well. Of all the cases I tested, the only problem was the lack of .debug level messages when using the macOS Console app.

I should file a bug about that but I can’t do it right now because I’d need to re-test while running macOS 14 beta, and I don’t have time today to set that up. If you have the latest macOS 14 beta installed, I’d appreciate you repeating my Console test and letting us know what you see.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hey, I had the same issue and i found out that you have to activate Info and Debug messages in Console App in the menu. Action -> Include Info Messages Action -> Include Debug Messages

This fixed the issue for me . Thanks

I too am seeing this issue where in the Console app (fine in Xcode) it won't show Logger debug message. Info ones are fine, OSLog works fine....

Running Xcode 15, MacOS 13.6, iOS 17.0.3 and WatchOS 10.0.2, its Apple Watch I'm trying to debug.

So, just to be clear:

  • If you run a test project on macOS, you see the .debug messages.

  • Likewise for a test project on iOS.

  • But not when you run one on watchOS.

Is that right?

That definitely rings various bells. I’m kinda fuzzy on the details but watchOS definitely limits logging for performance reasons. If you install the general watchOS logging profile — follow the instructions under WatchKit for watchOS on our Bug Reporting > Profiles and Logs page — does that help?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

This is still an issue—debug messages are not showing in Console.app, running macOS Sonoma 14.5 and Xcode 16.0 beta 4.

Xcode's own Console works fine.

This is still an issue

This thread is 7 years old and has covered a lot of different issues. Are you specifically referring to the watchOS one?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Yeah, let’s start a new thread for this. DevForums works better with shorter threads.

Please use the same topic, subtopic, and tags as this thread. That’ll make sure I see it.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Console app not showing info and debug logs
 
 
Q