Power Manager provides logging support through syslog.
Through syslog, Power Manager's daemon process, powermanagerd, provides a detailed log of:
Details of API events are provided as parseable Perl variables.
The following API log entry shows a event cancel request, with an OK (status 200) response.
Line | |
---|---|
1 |
API: {"Parameter"=>"8CA5ACFC-628B-48A8-9C98-4C7164944150","Authorization"=>"32 bytes of data","Request"=>"notifications.cancel"} > {"status"=>200} |
The following API log entry shows a request for all pending events, and the list of events returned.
Line | |
---|---|
1 |
API: {"Authorization"=>"32 bytes of data","Request"=>"notifications.pending"} > {"status"=>200,"response"=>[{"trigger"=>{"date"=>"2007 12 18 05:00:00","type"=>"once"},"name"=>"Early morning swim","uniqueid"=>"D7FE179D-7729-4413-87A1-C32083017290","metadatatriggerdate"=>"2007 12 18 05:00:00","enabled"=>1,"action"=>{"type"=>"start up or wake"}},{"trigger"=>{"date"=>"2007 12 18 10:15:00","type"=>"once"},"name"=>"Break","uniqueid"=>"EEF9E674-D63F-45AA-90B1-84F0FD8EFBC3","metadatatriggerdate"=>"2007 12 18 10:15:00","enabled"=>1,"action"=>{"type"=>"sleep"}},{"trigger"=>{"date"=>"2007 12 18 10:25:00","type"=>"once"},"name"=>"End of break","uniqueid"=>"8778CB1A-3F1A-4CE5-A929-84EA8200690B","metadatatriggerdate"=>"2007 12 18 10:25:00","enabled"=>1,"action"=>{"type"=>"wake"}}]} |
Add the following line to your /etc/syslog.conf file.
Line | |
---|---|
1 |
daemon.debug /var/log/daemon.log |
You need to reinitialise the syslogd process with a HUP signal after changing the syslog.conf file, or restart your computer.
Use the Console.app application to monitor the daemon.log file.
Remove or comment out the following line from your /etc/syslog.conf file.
Line | |
---|---|
1 |
daemon.debug /var/log/daemon.log |
You need to reinitialise the syslogd process with a HUP signal after changing the syslog.conf file, or restart your computer.
Use the Console.app application to monitor the daemon.log file.