Resolution: Cannot Reproduce
Affects Version/s: 0.10.0
Fix Version/s: None
Environment:Windows Visual Studio 2005 on Windows XP SP2
The DOMConfigurator does not appear to accept full-paths with the configure function. I do not know if this is by design or not but I thought it was a bug.
I did one test using the xml filename alone as you see below. The xml file in this test was located in the current working directory. This call works.
I did another test (the one that I would like to work) using the full path to the xml filename as follows. This call does not work.
std::string fullPath = "c:/program files/myapp/log4cxx.xml";
An exception was being thrown and I figured out why. The following function is what i'm calling into in DOMConfigurator.cpp:
void DOMConfigurator::configure(const std::string& filename)
// String value of filename here: C:/Program Files/MyApp/log4cxx.xml
// file.getPath().c_str() value here: C
It appears the file object is truncating the path and hence the call to apr_open_file following in doConfigure is crashing.
Is this by design?