In the console program I see a lot of the messages:
Keyboard Maestro Engine: Ignoring NSRunningApplication with pid -1
Can somebody explain what causes Keyboard Maestro to generate these messages?
In the console program I see a lot of the messages:
Keyboard Maestro Engine: Ignoring NSRunningApplication with pid -1
Can somebody explain what causes Keyboard Maestro to generate these messages?
Keyboard Maestro 7 uses the newer running application API based on the NSRunningApplication class.
Sadly, this new API is completely buggy garbage. The frontmostApplication occasionally returns nil. The runningApplications list includes applications with a -1 pid (every running process has a positive “process identifier” - pid).
Keyboard Maestro does its best to work around the garbage put out by this class, but yes, it is somewhat wordy in the log unfortunately.
Perhaps Apple will fix some of the bugs related to this class (since they have deprecated the older APIs, it would be kind of nice if the new APIs worked robustly).
If I sound kind of bitter, and if I sound like I’ve put in a dozen bug reports to Apple, well, that’s probably about accurate.
Hi, is there a way to suppress the log messages? I get around 10 per second on average
You could edit the syslog config file to filter out these messages.
sudo vi /etc/asl.conf
Before the # save everything from emergency to notice
line, insert the following 2 lines
# ignore KeyboardMaestroEngine API messages
? [= Sender Keyboard Maestro Engine] [CA= Message Ignoring NSRunningApplication with pid -1] ignore
Save the conf file and restart the syslog daemon.
sudo launchctl unload /System/Library/LauchDaemons/com.apple.syslogd.plist
sudo launchctl load /System/Library/LauchDaemons/com.apple.syslogd.plist
Here is the solution I use for this problem. Of course you need to customize the filters you want to use to trim the log.
KM Console Log - Trim.kmmacros (2.6 KB)