On 29 Nov 2018, at 12:07, Viktor Dukhovni wrote:
On Nov 29, 2018, at 9:15 AM, Robert Chalmers <racu...@gmail.com>
wrote:
I upgraded to and installed 3.4 today. It appears to be running, but
all logging has stopped. The last entry in the log file was at the
exact time I started the new version.
Apple changed the syslog API to use the os_log(3) interface, but
apparently
if you compile on a sufficiently old MacOS/X system, you get linked
against
the traditional syslog API.
So some people do that, but the os_log(3) stuff is configurable, so
you
should be able to configure the logs to be saved.
The word "should" has 2 distinct meanings...
There's already a default /etc/asl/com.apple.mail file which *according
to Apple's docs* should cause mail messages to go into
/var/log/mail.log, but they do not. Replicating the configuration in
/etc/asl.conf which seems to make some messages land in
/var/log/system.log does not work for any other target. None of the
/etc/asl/com.apple.* files which seem to want to cause messages to go
into log files actually generates any log files.
I agree that there *SHOULD* be a way to cause the broken "unified
logging" subsystem to save custom logs. That would be a good thing. I do
not believe that a working documented mechanism exists to do so. It
seems to me to be unlikely that anyone would stumble across whatever
magic is needed to achieve this result.
The in-memory logs
can be queried with log(1). For example:
# postfix reload
postfix/postfix-script: refreshing the Postfix mail system
# log show --info --style syslog --last 2m --predicate 'eventType ==
logEvent' | grep libpostfix-util
2018-11-29 12:02:26.765215-0500 localhost postlog[59348]:
(libpostfix-util.dylib) refreshing the Postfix mail system
2018-11-29 12:02:26.776443-0500 localhost master[33680]:
(libpostfix-util.dylib) reload -- version 3.4-20181125, configuration
/var/tmp/postfix/etc
Someone should figure out how create an asl.conf(5) configuration
that causes appropriate Postfix logs to land on disk, and share
the recipe.
As I said above, I'm not sure that's possible. However, one could launch
this persistently in the background (either via launchd or even 'batch'
if you're into such things...) and get an emulation of sane mail
logging:
log stream --info --predicate 'senderImagePath CONTAINS "postfix"'
--style syslog >> /var/log/mail.log
--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Available For Hire: https://linkedin.com/in/billcole