Hi,
I'm on MacBook Pro M2, macOS 13.3.1. I'm writing a feature that need to run before login. After some research I found PreLoginAgents sample code: https://developer.apple.com/library/archive/samplecode/PreLoginAgents/Introduction/Intro.html
Followed README, installed pre-built agent and SSH to Macbook, then run:
sudo syslog -c 0 -i
syslog -w
volia! SSH prints agent log, it is working.
But if I build code with XCode, there is no log. I tried following changes with no luck:
- change LogManager acl log to os_log_info(OS_LOG_DEFAULT, "%s", [str UTF8String]), no log
- change to syslog(LOG_INFO, "%s", [str UTF8String]), has log!
- But change min deploy target from 10.9 to 11.0, syslog print no log
What is the proper way to print PreLoginAgents log?
Thanks!