On Sep 3, 2004, at 3:56 AM, Mattias Brändström wrote:
Hello!
I have two questions about the log4cxx API.
First of all, when I configure log4cxx in the following way:
log4cxx::PropertyConfigurator::configure(string("/usr"));
it fails silently. Is this the way it is supposed to behave? I would
have preffered it to say something similar to what it says when I
point it to a file that edoes not exist.
Don't know that one off the top of my head
My second question is about the String class. In the examples I have
seen strings are constructed with _T(). Where is this function
declared? Where is String declared? Will it be OK for me to send
strings to log4cxx using std::string?
I've been assigned to rework the Unicode support and will dive into as
soon as I finish my current project. The bug report
(http://nagoya.apache.org/jira/browse/LOGCXX-10) has more details. _T
is a preprocessor macro defined in log4cxx/helpers/tchar.h (patterned
after Windows tchar.h) that wraps the string literal with a L so make
it a long string literal if UNICODE is defined. Currently log4cxx only
supports logging Unicode or MBCS, in my rework, it can support both
simultaneously. I expect to remove the _T macro from log4cxx (since it
can be inconsistent with the Windows tchar.h definition) and would
avoid using it in new code. String is an alias for std::string unless
UNICODE is set when it is an alias for std::wstring. So if you pass
char* or std::string's to log4cxx, you should see no changes when I've
finished the Unicode rework.
|