You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by je...@atol.si on 2007/02/12 16:25:53 UTC
how to configure log4J to write UTF-8 file
Hi !
I use log4j to log on IBM Host that uses EBCDIC encoding.
I would like to configure my logger to write in file as UTF-8.
This is what I have in my log4j.properties file:
log4j.appender.daily=org.apache.log4j.DailyRollingFileAppender
log4j.appender.daily.File=log.log
log4j.appender.daily.Append=true
log4j.appender.daily.DatePattern='.'yyyy-MM-dd
log4j.appender.daily.layout=org.apache.log4j.PatternLayout
log4j.appender.daily.layout.ConversionPattern=%d %-5r %-5p [%c] (%t:%x)
%m%n
Could I set explicitly encoding somehow in my properties file ?
Thank you !
Jelka
Re: how to configure log4J to write UTF-8 file
Posted by Curt Arnold <ca...@apache.org>.
On Feb 12, 2007, at 9:25 AM, jelka.kosir@atol.si wrote:
> Hi !
>
> I use log4j to log on IBM Host that uses EBCDIC encoding.
>
> I would like to configure my logger to write in file as UTF-8.
>
> This is what I have in my log4j.properties file:
>
> log4j.appender.daily=org.apache.log4j.DailyRollingFileAppender
> log4j.appender.daily.File=log.log
> log4j.appender.daily.Append=true
> log4j.appender.daily.DatePattern='.'yyyy-MM-dd
> log4j.appender.daily.layout=org.apache.log4j.PatternLayout
> log4j.appender.daily.layout.ConversionPattern=%d %-5r %-5p [%c] (%t:
> %x)
> %m%n
>
> Could I set explicitly encoding somehow in my properties file ?
>
> Thank you !
>
> Jelka
Add
log4j.appender.daily.encoding=UTF-8
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org