[Mono-list] Writing to Linux Logs
A Rafael D Teixeira
rafael.teixeirabr@terra.com.br
Thu, 10 Mar 2005 10:43:06 -0300
Reference the Mono.Posix assembly, and use:
using Mono.Unix;
void Syscall.openlog (IntPtr ident, SyslogOptions option, SyslogFacility
defaultFacility)
void Syscall.syslog (SyslogFacility facility, SyslogLevel level, string
message)
void Syscall.syslog (SyslogLevel level, string message)
void Syscall.closelog ()
int Syscall.setlogmask (SyslogLevel mask)
HIH,
On Wed, 2005-03-09 at 00:55, Shane G. Brodie wrote:
> I have not yet been able to locate a namespace which provides facilities
> for writing to the Linux system logs such as would be accomplished using
> the syslogd daemon.
>
> Is there a native Mono way to do this, or is there another way to do
> this (IE: Can you link in the C/C++ functions to do so??? If so, is
> there any documentation anywhere on how this is handled?)
>
> The following include and prototypes seem to be the C way to do what I
> want to do, but I've not been able to find any examples of doing this
> from Mono ....
>
> #include <syslog.h>
> void openlog( char *ident, int option, int facility)
> void syslog ( int priority, char *format, ...)
> void closelog( void )
>
>
>
> Regards
>
> Shane Brodie
>
> Newbie Linux Developer
> Veteran Windows Developer
>
> _______________________________________________
> Mono-list maillist - Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://mail.terra.com.br/protected_email/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1,1110340605.797650.28225.casama.terra.com.br,3516,Des15,Des15
>
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 08/03/2005 / Versão: 4.4.00 - Dat 4442
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
--
Rafael "Monoman" Teixeira
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/