fix msvc compilation with log4cxx
This commit is contained in:
parent
19a3b041f5
commit
27f67d52c8
2 changed files with 5 additions and 1 deletions
src
|
@ -147,9 +147,9 @@ static void initLogging(Config *config, std::string key, bool only_create_dir =
|
||||||
dirs.push_back(dir);
|
dirs.push_back(dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifndef WIN32
|
||||||
mode_t old_cmask;
|
mode_t old_cmask;
|
||||||
// create directories
|
// create directories
|
||||||
#ifndef WIN32
|
|
||||||
old_cmask = umask(0007);
|
old_cmask = umask(0007);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,11 @@ int main (int argc, char* argv[])
|
||||||
{
|
{
|
||||||
#ifdef WITH_LOG4CXX
|
#ifdef WITH_LOG4CXX
|
||||||
LoggerPtr root = Logger::getRootLogger();
|
LoggerPtr root = Logger::getRootLogger();
|
||||||
|
#ifndef _MSC_VER
|
||||||
root->addAppender(new FileAppender(new PatternLayout("%d %-5p %c: %m%n"), "libtransport_test.log", false));
|
root->addAppender(new FileAppender(new PatternLayout("%d %-5p %c: %m%n"), "libtransport_test.log", false));
|
||||||
|
#else
|
||||||
|
root->addAppender(new FileAppender(new PatternLayout(L"%d %-5p %c: %m%n"), L"libtransport_test.log", false));
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::vector<std::string> testsToRun;
|
std::vector<std::string> testsToRun;
|
||||||
|
|
Loading…
Add table
Reference in a new issue