From: cantor Date: Wed, 30 Jan 2008 18:08:17 +0000 (+0000) Subject: Support path resolution in log config. X-Git-Tag: 1.4.1~365 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fxmltooling.git;a=commitdiff_plain;h=d03d73dd5f54e29603cb0ec09eb528291e2700a9 Support path resolution in log config. git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/trunk@463 de75baf8-a10c-0410-a50a-987c0e22f00f --- diff --git a/xmltooling/XMLToolingConfig.cpp b/xmltooling/XMLToolingConfig.cpp index fedd859..82dbc8d 100644 --- a/xmltooling/XMLToolingConfig.cpp +++ b/xmltooling/XMLToolingConfig.cpp @@ -165,10 +165,13 @@ bool XMLToolingInternalConfig::log_config(const char* config) root.setPriority(Priority::FATAL); level=true; } - if (level) + if (level) { root.setAppender(new OstreamAppender("default",&cerr)); - else - PropertyConfigurator::configure(config); + } + else { + string path(config); + PropertyConfigurator::configure(m_pathResolver ? m_pathResolver->resolve(path, PathResolver::XMLTOOLING_CFG_FILE).c_str() : config); + } } catch (const ConfigureFailure& e) { Category::getInstance(XMLTOOLING_LOGCAT".Logging").crit("failed to initialize log4cpp: %s", e.what());