Forrest logo
back to the log tool

log:tldr:d0fbc

log: Show logs sent to syslog from a process with a specific name.
$ log show --predicate "process == '${process_name}'"
try on your machine

The command "log show --predicate "process == '${process_name}'"" is used to display logs in a macOS system that match a specific process name.

Here's a breakdown of the command:

  • "log show" is the command to display logs on macOS.
  • "--predicate" is an option that allows you to filter the logs based on specific criteria.
  • "process == '${process_name}'" is the predicate expression used to filter the logs. In this case, it filters for logs where the 'process' field is equal to the value of the variable 'process_name'.

So, when you run this command, it will show the logs that are associated with the specified process name (the value of the 'process_name' variable will be substituted in the command).

For example, if you set 'process_name' to "MyApp", the command will display logs related to the "MyApp" process only.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the log tool