diff --git a/backends/libpurple/main.cpp b/backends/libpurple/main.cpp index 903966800f79085bfcbe05504ed7d0e509daea46..a1bcd78834a8529192f47c81fe8db24c45962348 100644 --- a/backends/libpurple/main.cpp +++ b/backends/libpurple/main.cpp @@ -19,6 +19,8 @@ #include "log4cxx/consoleappender.h" #include "log4cxx/patternlayout.h" #include "log4cxx/propertyconfigurator.h" +#include "log4cxx/helpers/properties.h" +#include "log4cxx/helpers/fileinputstream.h" using namespace log4cxx; @@ -1037,7 +1039,12 @@ int main(int argc, char **argv) { root->addAppender(new ConsoleAppender(new PatternLayout("%d %-5p %c: %m%n"))); } else { - log4cxx::PropertyConfigurator::configure(CONFIG_STRING(&config, "logging.backend_config")); + log4cxx::helpers::Properties p; + log4cxx::helpers::FileInputStream *istream = new log4cxx::helpers::FileInputStream(CONFIG_STRING(&config, "logging.backend_config")); + + p.load(istream); + p.setProperty("pid", boost::lexical_cast(getpid())); + log4cxx::PropertyConfigurator::configure(p); } initPurple(config);