If you add a environment variable in the config file
eg) log4cplus.appender.test_appender.File=${%USERPROFILE%\test.log
there will be an error "unable to open c:\documents and settings\user1 \test.log"
Solution
The function
errno_t getenv(::log4cplus::tstring& s, ::log4cplus::tstring const& name)
in the file getenv.cxx has a statement
s.assign(libvar.begin(), libvar.end());
it should be modified to
s.assign(libvar.begin(), libvar.end()-1); //exclude null terminator
Ok, I am confused. There is no file named getenv.cxx in the log4cplus source, at least not in either 1.0.2 or 1.0.3 release candidates. What version of log4cplus are you using?