2

On macOS, why is the output of log stream different to log show? Specifically:

log stream --predicate '(process == "smtpd") || (process == "smtp")' --debug

In this case --debug also shows info level messages (from man log) It shows incoming connection entries such as:

2019-03-04 10:55:25.537313+0000 0x34491f   Info        0x0                  40392  smtpd: connect from unknown[192.168.1.115]

But:

log show --debug --info --start "2019-03-04 10:55:24" --end "2019-03-04 10:55:27"

Does not show any such message, nor any Info level message for that matter. This is making it very hard to diagnose postfix issues on macOS.

0

By default debug messages are not persisted on disk, but rather only stored in memory.

Therefore you can have the situation where you can stream the debug log messages live using the "log stream" command, but when you later want to find it using "log show" it is not there simply because it is not logged to disk and has been erased from memory.

  • Is there a way of changing this? To me having to redirect the output of log stream to a file seems like using a hammer on a screw. – Tim Bedford Mar 6 at 11:56
  • Yes, you can set it up in /etc/asl.conf. Check the man page for details. – jksoegaard Mar 6 at 18:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .