From d03d73dd5f54e29603cb0ec09eb528291e2700a9 Mon Sep 17 00:00:00 2001 From: cantor Date: Wed, 30 Jan 2008 18:08:17 +0000 Subject: [PATCH] Support path resolution in log config. git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/trunk@463 de75baf8-a10c-0410-a50a-987c0e22f00f --- xmltooling/XMLToolingConfig.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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()); -- 2.1.4