in reply to Write to WIndows Event Log
The above are all excellent answers. For the sake of those who may be using cygwin without Win32::EventLog, here's a solution that uses a command-line utility, syslog.exe, that comes with cygwin.
system qq( /bin/syslog.exe -p info -t "Prog" "The message." );
The argument of the -t option appears in the 'Source' column of the event viewer. If omitted, it defaults to the executing user's login name.
The message goes into the 'Description' field of the event.
This method has the same issue with programs not being registered, as noted in the answers above.
|
|---|