5

Implemented Apples unified logging system.

let logger = Logger(subsystem: "com.myapp.test", category: "someCategory")

I am trying to make the logging visible in Apples Console App, but it does not work for Info/ Debug Levels.

logger.info("Info Message") // not visible in Apple Console App

logger.error("Error Message") // visible in Apple Console App

In XCode it works just fine for all levels.

I have already configured logging for the subsystem:

sudo log config --mode "level:info" --subsystem com.myapp.test
sudo log config --status --subsystem com.myapp.test
Mode for 'com.myapp.test'  INFO PERSIST_OFF

What am i missing here?

macOS 12.4, XCode 13.3.1

3
  • 1
    Did you ever figure this out? Commented Jun 10, 2022 at 16:22
  • Nope, but feel free to upvote the question, i will set a bounty if we get enough votes up. Commented Jun 11, 2022 at 18:47
  • Are Console> Action > Include Info Messages and and Include Debug Messages enabled? Look at: stackoverflow.com/a/66948803/979986? Commented Jun 13, 2022 at 11:55

1 Answer 1

6
+50

I faced the same problem. Info and debug level messages must be activated in the Console application: Console > Action > Include Info Messages and Include Debug Messages.

Take a look at Apple documentation at Include info or debug messages.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.