Curt,
Thanks for the response. Do you thinking the solution is difficult
because I am not using XML configuration? Or irrespective of my using
XML configuration or programmatic configuration, the solution is
difficult?

Thanks,

-Pramodh.

-----Original Message-----
From: Curt Arnold [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 09, 2007 5:59 PM
To: Log4J Users List
Subject: Re: SyslogAppender with tcp


On Apr 9, 2007, at 2:50 PM, Pramodh Peddi wrote:

> Hi,
>
> I am using log4j for logging and doing syslogging to the localhost  
> using
> SyslogAppender. I am NOT using configuration/XML file to specify log4j
> settings. I am using java code to provide settings. Things are working
> fine except that I want to use tcp while syslogging. I am assuming
> default is UDP protocol for syslogging. Is there any way I can specify
> log4j to use tcp using java code (not in xml/configuration)?
>

org.apache.log4j.net.SyslogAppender only supports UDP transport as  
described in RFC 3164 (http://tools.ietf.org/html/rfc3164).  There is  
(as far as I can tell) no support in the code for TCP transport of  
syslog messages and therefore no easy configuration change that will  
switch transports.

I did a quick search on syslog over TCP.  Things seem pretty muddled  
on the standards front: RFC 3195 (http://tools.ietf.org/html/rfc3195)  
doesn't seem to be widely implemented and I'm guessing there are ad- 
hoc implementations of syslog over TCP that are implementation  
specific.  It would be necessary to understand the landscape before  
considering accepting a contribution or starting an effort to  
implement a different protocol.  Unless somebody new wants to jump  
in, I think it is unlikely that any of the existing developers would  
want to tackle the effort.

If your platform implementation of syslog implements syslog of TCP,  
you could consider using a Java Native Interface (JNI) based  
SyslogAppender such as the one submitted for bug 27363 (http:// 
issues.apache.org/bugzilla/show_bug.cgi?id=27363).



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to