logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <remko.po...@gmail.com>
Subject Re: log4j properties files having Non-English Characters
Date Mon, 12 Aug 2013 12:47:24 GMT
Properties files should not have non-English characters. You need to
convert your file with the native2ascii tool.

More detail:
http://stackoverflow.com/questions/4659929/how-to-use-utf-8-in-resource-properties-with-resourcebundle

Remko

On Monday, August 12, 2013, Jagan kona wrote:

> Hi,
>
> I am using log4j, i am facing small problem when log4j.properties file
> contains non-english characters. Below is the content of properties files,
>
> # Define the root logger with appender file
> log4j.rootLogger = DEBUG, FILE
> # Define the file appender
> log4j.appender.FILE=org.apache.log4j.FileAppender
> log4j.appender.FILE.File=C:\temp\新しいフォルダ\logs\templog4j.log
> # Define the layout for file appender
> log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
> log4j.appender.FILE.layout.conversionPattern=%m%n
>
> when i am using non-english characters in "log4j.appender.FILE.File", then
> i am getting error as log4j api's not able to understand the path, pasted
> below is the error
> log4j:ERROR setFile(null,true) call failed.
> java.io.FileNotFoundException: C:emp??°??????????????≪???logs emplog4j.log
>
> please point if i am doing any wrong in configuration, does log4j support
> properties files stored in UTF-8 format.
>
> Thanks In Advance.
>
> Regards,
> Jagan
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message