Changeset - 27f67d52c81e
[Not reviewed]
0 2 0
Vitaly Takmazov - 13 years ago 2013-02-13 11:53:51
vitalyster@gmail.com
fix msvc compilation with log4cxx
2 files changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/logging.cpp
Show inline comments
 
@@ -144,15 +144,15 @@ static void initLogging(Config *config, std::string key, bool only_create_dir =
 
				boost::replace_all(dir, "${jid}", jid);
 
				boost::replace_all(dir, "${pid}", pid);
 
				boost::replace_all(dir, "${id}", id);
 
				dirs.push_back(dir);
 
			}
 
		}
 
#ifndef WIN32
 
		mode_t old_cmask;
 
		// create directories
 
#ifndef WIN32
 
		old_cmask = umask(0007);
 
#endif
 

	
 
		BOOST_FOREACH(std::string &dir, dirs) {
 
			if (!dir.empty()) {
 
				try {
src/tests/main.cpp
Show inline comments
 
@@ -16,13 +16,17 @@ using namespace log4cxx;
 

	
 

	
 
int main (int argc, char* argv[])
 
{
 
#ifdef WITH_LOG4CXX
 
	LoggerPtr root = Logger::getRootLogger();
 
#ifndef _MSC_VER
 
	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
 

	
 
	std::vector<std::string> testsToRun;
 
	for (int i = 1; i < argc; ++i) {
 
		std::string param(argv[i]);
 
		testsToRun.push_back(param);
0 comments (0 inline, 0 general)