I've added versions of the following to each of the
launchd plist files for all of the scripts I run on my server:
These are all PHP shell scripts, so I capture standard output with an output buffer and store that in an SQL database, not in a log file. But for the errors, I use this to create error logs.
The problem is that what I'm getting in my error logs is often not errors. For example, the error log for my
launchd VPN script writes every incoming VPN connection to the error log.
2019-05-04 06:33:43 EDT Server 'com.apple.ppp.l2tp' starting... 2019-05-04 06:33:43 EDT Loading plugin /System/Library/Extensions/L2TP.ppp 2019-05-04 06:33:43 EDT Listening for connections... 2019-05-04 06:34:23 EDT Incoming call... Address given to client = [redacted] 2019-05-04 06:35:21 EDT --> Client with address = [redacted] has hungup 2019-05-04 06:35:35 EDT Incoming call... Address given to client = [redacted]
That doesn't look like error output. That looks like regular old normal, no problem output. The two "calls" were me connecting and disconnecting from the VPN normally.
What is going on here? It's possible I'm not fully understanding what
stdout actually are. Does this make sense to anyone?
I'll have more examples in a few hours once more scripts run, as I have intentionally flushed all these logs.