0

I have this small perl script, I run it as root:

use strict;
use Sys::Syslog qw( openlog syslog LOG_INFO );
openlog ('mamamia', 'ndelay', 'mail') or die "Cannot open syslog!";
syslog (LOG_INFO, 'MAMAMIA MAMAMIA MAMAMIA MAMAMIA MAMAMIA MAMAMIA MAMAMIA MAMAMIA!');

How can I get to see these log messages? They do not show up in Console or I also cannot see them using log stream

I am using macOS Monterey

gctwnl
  • 694
  • based on https://perldoc.perl.org/Sys::Syslog#FUNCTIONS the last arg in openlog is a facility. Now you are using "mail", can you check other facilities? they are listed here: https://perldoc.perl.org/Sys::Syslog#Facilities – Mateusz Szlosek Feb 22 '23 at 12:31
  • I've been able to use the log command as in log show --start "2023-02-22 14:10:00" --process 429 --info but that requires I already know the pid. Same for using the command, which is perl5.34 (not very precise). Console.app doesn't show me anything. – gctwnl Feb 22 '23 at 15:09

0 Answers0