You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Jay <jv...@comcast.net> on 2003/07/10 01:58:05 UTC

[PATCH] charset support for SyslogAppender

I created the attached patches to allow for charset translation on the 
SyslogAppender.  When using log4j on a S390 system it will send all the 
datagrams in EBCDIC, instead of ASCII.  With the patch you can add an 
optional charset for example:

 log4j.appender.UnixSyslog.SyslogHost=myhost/US-ASCII

I was not sure if it was acceptable to share a property like this.  I started 
to make a charset property but it turned out to be more efficient to share 
SyslogHost, mostly due to the order objects seemed to be created.

Could this patch be added to a future release?

Thanks.

Jay van der Meer

Re: [PATCH] charset support for SyslogAppender

Posted by Ceki Gülcü <ce...@qos.ch>.
Hello Jay,

Thank you for your patch.

For reasons of consistency alone, I think aggregating properties is 
probably not a good idea.

Did you know that the activateOptions method is called after all parameters 
are configured, precisely to give appenders the chance to configure 
themselves or become active as the method name suggests.

See also  the documentation on org.apache.log4j.spi.OptionHandler

http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/spi/OptionHandler.html

I am looking forward for your modified patch.

At 06:58 PM 7/9/2003 -0500, Jay wrote:
>I created the attached patches to allow for charset translation on the
>SyslogAppender.  When using log4j on a S390 system it will send all the
>datagrams in EBCDIC, instead of ASCII.  With the patch you can add an
>optional charset for example:
>
>  log4j.appender.UnixSyslog.SyslogHost=myhost/US-ASCII
>
>I was not sure if it was acceptable to share a property like this.  I started
>to make a charset property but it turned out to be more efficient to share
>SyslogHost, mostly due to the order objects seemed to be created.
>
>Could this patch be added to a future release?
>
>Thanks.
>
>Jay van der Meer

--
Ceki  For log4j documentation consider "The complete log4j manual"
       ISBN: 2970036908  http://www.qos.ch/shop/products/clm_t.jsp 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org