Where do the DEBUG and INFO messages go when using Python SyslogHandler on MAC OSX?

I configured the Python logger using SysLogHandler and, as a test, logged some messages using all levels: debug, info, warning, error, critical. I see all my messages if I run syslog or looked at the Console.app display. Thus, all messages are logged correctly. But, when I tail /var/log/messages.log, I do not see DEBUG and INFO messages. I read about ASL and I see a directory with a name /var/log/aslfull of binaries, but I do not quite understand how it interacts with syslog, if at all.

+1
source share
1 answer

Using man syslog, man asl(ASL = Apple syslog) and man aslmanager, you will see that there is a configuration file /etc/asl.conf, and the default version contains the lines:

# save everything from emergency to notice
? [<= Level notice] store

These messages in DEBUG and INFO are therefore not saved by the ASL, which in turn means that after the fact they cannot be printed syslog. The program syslogapparently reads the saved data from the ASL binaries, not from a text file /var/log/messages.log.

/etc/asl.conf, INFO DEBUG. ASL (syslogd, aslmanager) , , , ( , DEBUG INFO , ).

+6

Source: https://habr.com/ru/post/1696127/


All Articles