Since the release of macOS, which features a new logging system, some people have reported certain apps going crazy with the massive amount of log writing they do. This can get so bad that the Mac gets hot because it’s working so hard to write the data. Typically the log is viewed in the Console app, which you’ll find in the Utilities folder of the Applications list.
(If you don’t know what logging is in the context of computing, Wikipedia can help.)
All existing information you might find online about turning off or otherwise controlling OS X/macOS’s logging is now obsolete, thanks to the changes in macOS. Therefore, below are the steps that do actually work in order to turn off logging for any particular app or process. I haven’t yet found a way to turn off logging entirely, for all apps and the entire system, and my guess would be this is impossible because Apple’s engineers didn’t believe it would ever be necessary. However, if you know of a way then please let me know in the comments below.
- Open a Terminal window, which you’ll find in the Utilities folder of the Applications list within Finder.
- Using Console, as discussed earlier, find the name of the runaway logging process or app. In the Terminal window type pgrep -il, and then the name of the app or process. For example, if the process was touchui then I would type the following:
pgrep -il touchui
- Make a note of the number alongside the process in the results (this number is know as the process ID, or PID). Note that the results might include extraneous entries that you can ignore. If nothing appears, try searching for just part of the name of the app or process – to continue the example above, you might search just for touch.
- In the Terminal window paste in the following, before typing the number you discovered earlier:
sudo log config --process=
- After typing the number, hit Space and then paste in the following:
- The line you end-up with should look something like the following (which is a single line even though it may appear on two lines in your browser). In my example the number returned by the pgrep command for my errantly logging app was 65:
sudo log config --process=65 --mode "level:off"
- Hit Enter, and type your login password when prompted. You might see a serious-looking warning. Don’t worry about it.
- The results will take effect instantly, and you can close the Terminal window. From this point on, and until you reboot, the runaway logging app’s log output will not be logged.
It’s very important to note here that you’re merely turning off log output for that particular app or process. You aren’t killing the app or process itself, or hindering how it runs in any way.
To turn logging back on for that app or process it’s easiest to simply reboot the computer but if that’s not possible then the following should do the trick. You’ll need to replace PID after ––process with the number you discovered earlier:
sudo log config --process=PID --mode "level:default"