On May 29, 2007, at 8:13 AM, Bala wrote:
I am having logcxx dated october 2006. I am trying to get it
working on 64 bit
platform AIX 5.3 Compiler Xlc 6.0.0.11. Strangely on AIX alone i
get the
following output on running trivial. When i run the testsuite, the
INFO, WARN,
FATAL logger names never occur.
It works well on other platforms.
On using this library with my application, all the looger names are
corrupted
as \u006F\u002E\u0032\u0052\u007 ...... - logging test
conversion pattern is %c - %m%n.
90 [0x1] DEBUG root trivial context - debug message
93 [0x1] root trivial context - info message
93 [0x1] root trivial context - warn message
93 [0x1] ERROR root trivial context - error message
93 [0x1] root trivial context - fatal message
Have anyone faced a similar issue?
If you are seeing \u006F and the like, the problem is likely a
failure in the CharsetEncoder where it is getting a failure
converting characters to either the default or specified encoding and
it is falling back to outputting a Java-like escape sequence to
represent a character that it does not think is representable in the
target encoding. I'm guessing that CharsetEncoder is appropriately
responding to a failure in apr_xlate and you need to track down why
apr_xlate is failing on AIX.
If you used the make build for apr-util, what happens if you run
"make check"? If you didn't, could you try it. I believe there is a
test of apr_xlate in the suite, but haven't checked.
Is iconv installed on your machine?
Do you see a list of encodings if you do "iconv -l"?
If you were specifying an encoding, is it one that appears in the
list? (If not, change it to an supported encoding).
If you were not specifying an encoding, does the problem disappear if
you do specify one of the encodings from the list?
Are you calling setlocale(LC_ALL, "") sometime before log4cxx is
initialized? If not, then the value of the default encoding
retrieved by log4cxx may not meet your expectations. There is an
open bug related to the issue so hopefully eventually log4cxx will
track changes to the locale, but right now it only determines the
default encoding once and does not respond to subsequent changes.