-
Notifications
You must be signed in to change notification settings - Fork 195
Logging
Nudge uses os_log for all logging, this streams logs to then built in logging system.
You can view these logs in Terminal using
log stream --predicate 'subsystem == "com.github.macadmins.Nudge"' --info --style syslog --color none
Using the --level
flag you can set the displayed logs to debug, info, warning, or error.
Or make them more parsable using the json
flag
log show --predicate 'subsystem == "com.github.macadmins.Nudge"' --info --style json --debug
There is the option of using sudo log collect
to collect all of the system logs into a .logarchive
and then review it using the --source
flag in log show
Because these logs are only streaming they're not stored for very long (depending on the level). If you want non-ephemeral logs then you should setup a Launch Daemon that streams the logs into a file
An example LaunchDaemon can be found here https://github.com/macadmins/nudge/blob/main/build_assets/com.github.macadmins.Nudge.logger.plist. This will at launch start writing the logs to /var/log/nudge.log
which you can either tail
or open with the Console app