logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason S. Whitwill" <Jason.Whitw...@pleora.com>
Subject PropertyConfigurator::configure file encoding
Date Tue, 01 Feb 2011 15:21:37 GMT
I'm passing a file to PropertyConfigurator::configure to initialize my log4cxx logging configuration.
Inside the configuration file I have a rolling file appender with the file property set to

For example:
log4j.rootLogger=info, R
log4j.appender.R.layout.ConversionPattern=%r %p %t %c - %m%n

If the log configuration file is encoded in ansii, everything works fine as long as the APPDATA
path doesn't contain any characters outside of the normal ascii range. However, if the path
contains Chinese characters for example, I see no output file. I attempted to save the log
configuration file with Unicode encoding but unfortunately, no matter what the contents of
the file, log4cxx would fail to read it. I am passing the path to the configuration file as
a wchar_t*. I'm presuming that the rolling file appender supports outputting to a path containing
international characters as the constructor accepts a LogString parameter.

Is there a particular encoding that would make it such that international characters could
be interpreted correctly when parsing the configuration file using PropertyConfigurator::configure?

Thank you for your time.

Jason Whitwill
Software Designer

Pleora Technologies Inc.
Phone: +1-613-270-0625 ext 153
Fax: +1-613-270-1425

This communication contains confidential information intended only for the addressee(s). If
you have received this communication in error, please notify us immediately and delete this
communication from your mail box.

View raw message