|
|
|
@ -26,6 +26,7 @@ |
|
|
|
|
#include <log4cxx/propertyconfigurator.h> |
|
|
|
|
#include <log4cxx/helpers/properties.h> |
|
|
|
|
#include <fstream> |
|
|
|
|
#include <cstdlib> |
|
|
|
|
|
|
|
|
|
#if (__GNUC__==3 && __GNUC_MINOR__<4 || __GNUC__<3) \ |
|
|
|
|
&& defined(_REENTRANT) && !defined(_MT) |
|
|
|
@ -125,93 +126,93 @@ log4j.appender.A1.layout.ConversionPattern = \%-40l - \%m\%n |
|
|
|
|
logconfigfile = "/etc/mrwlog4cxx"; |
|
|
|
|
if (logconfigfile.size()) { |
|
|
|
|
log4cxx::PropertyConfigurator::configure |
|
|
|
|
(log4cxx::String(logconfigfile.begin(), logconfigfile.end())); |
|
|
|
|
(std::string(logconfigfile.begin(), logconfigfile.end())); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
log4cxx::helpers::Properties properties; |
|
|
|
|
std::string name, cont; |
|
|
|
|
properties.setProperty((name="log4j.rootLogger", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="WARN, A1", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fntracea", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fn", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fn.log4cxx", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fn.boost", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fn.Thread", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fn.QString", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fn.QShared", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fn.QWidget", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fn.QRect", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fn.qstrcmp", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fn.*.qt_cast", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fn.mrw", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fn.std", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fn.CppUnit", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.logger.mrw.fn.__gnu_cxx", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="OFF", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.appender.A1", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="org.apache.log4j.ConsoleAppender", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
properties.setProperty((name="log4j.appender.A1.layout", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="org.apache.log4j.PatternLayout", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
#ifdef _MT |
|
|
|
|
properties.setProperty((name="log4j.appender.A1.layout.ConversionPattern", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="%t-%-40l - %m%n", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
#else |
|
|
|
|
properties.setProperty((name="log4j.appender.A1.layout.ConversionPattern", |
|
|
|
|
log4cxx::String(name.begin(), name.end())), |
|
|
|
|
std::string(name.begin(), name.end())), |
|
|
|
|
(cont="%-40l - %m%n", |
|
|
|
|
log4cxx::String(cont.begin(), cont.end()))); |
|
|
|
|
std::string(cont.begin(), cont.end()))); |
|
|
|
|
#endif |
|
|
|
|
log4cxx::PropertyConfigurator::configure(properties); |
|
|
|
|
} |
|
|
|
|