[Mono-list] Using the syslog [Mono.Unix.Native.Syscall] with ownidentifier

mabra at manfbraun.de mabra at manfbraun.de
Fri Dec 3 06:11:12 EST 2010


Hi !

After I found a nice article to do this in the C language,
I discovered in mono too and made it working. Because there
is no documentation about it, here a sample:


string logIdent = "Demo1";
Syscall.openlog
	(
		Marshal.StringToHGlobalAuto(logIdent),
		SyslogOptions.LOG_PERROR | SyslogOptions.LOG_PID,
		SyslogFacility.LOG_LOCAL5
	);


Just for the case, someone searchs for an example.

br++mabra


-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of mabra at manfbraun.de
Sent: Wednesday, December 01, 2010 8:37 PM
To: Mono-list at lists.ximian.com
Subject: [Mono-list] Using the syslog [Mono.Unix.Native.Syscall] with
ownidentifier

Hello !

If I use:

Syscall.syslog(SyslogFacility.LOG_DAEMON, SyslogLevel.LOG_NOTICE, "myMsg");

this appears with identifier "mono:" in the syslog. To make syslog
more evaluable, I need to define my own identifier instead.

I could not find anything descriptive in the docs, how
to do this and I would help me a lot, to see which function
and possibly an example.

Thanks a lot.

br--mabra


_______________________________________________
Mono-list maillist  -  Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list




More information about the Mono-list mailing list