manban
manban

Reputation: 133

Swift Unified Logging

I was searching for some information on how to do proper logging in swift. I found Unified Logging: https://developer.apple.com/documentation/os/logging.

When trying it, I couldn't figure out how I can see the logs for only my defined Subsystem and the Category. Is there a way in the console oder the system log of the ios simulator to have only the application related logs? I couldn't see the app logs neither in the console nor in the simulator's system logs.

Here is my code:

let customLogger = OSLog(subsystem: "com.myapp", category: "CustomLogs")
os_log("Test log message.", log: customLogger, type: .debug)

Upvotes: 1

Views: 331

Answers (1)

user431791
user431791

Reputation: 341

enter image description here

In case you still looking for an answer.

Upvotes: 2

Related Questions