How to log with PHP to Windows Event log? -
am trying log syslog()
on windows (iis 7.5) , can't make appear in windows events.
what tried far:
- php.ini -> error_log = "syslog" (this advised on multiple sites)
- giving iusr_... user right permissions wrote event logs (even administrator permissions)
any clue or appreciated!
with php 5.2, php allows 2 methods of logging php events using error_log directive in php.ini. typical set configure php log flat file, setting error_log value full path , file name php log file.
simply open php.ini file text editor , replace;
log_errors = off
with;
log_errors = on
this turn on php logging in php. next step direct php log events windows event log finding this;
;error_log = syslog
and replacing with;
error_log = syslog
although syslog *nix equivalent of windows event log still need specify here php not differentiate between two, php know log windows event log when being used on windows system. done save php.ini file , recycle iis application pools using php, , should start seeing php events being logged windows application log in event viewer.
Comments
Post a Comment