[Mono-list] logging to remote syslog servers
GARRISON, TRAVIS J.
garrisot at otc.edu
Thu Feb 10 16:14:16 EST 2011
I have been able to log requests to the local syslog server just fine. How to I edit my code to send the logs to a remote syslog server? Also, is there a way to change what computer name is sent to the syslog? We will be using this program in a Netboot environment for our Mac build process and the computer name will not be set yet. Just the randomly generated name.
IntPtr ident = Marshal.StringToHGlobalAnsi("Network Software");
Syscall.openlog(ident, SyslogOptions.LOG_PERROR | SyslogOptions.LOG_PID, SyslogFacility.LOG_DAEMON);
Syscall.syslog(SyslogFacility.LOG_DAEMON, SyslogLevel.LOG_NOTICE, "Test Message");
Syscall.syslog(SyslogFacility.LOG_DAEMON, SyslogLevel.LOG_NOTICE, "Test Message 2");
Syscall.closelog();
Marshal.FreeHGlobal(ident);
Thanks
Travis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20110210/096e7096/attachment-0001.html
More information about the Mono-list
mailing list