logging to file
This commit is contained in:
parent
6725269fa6
commit
adce9ab5bf
@ -66,8 +66,8 @@ void Logger::logConcordiaSearchResult(const ConcordiaSearchResult & result) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Logger::_initialize(log4cpp::Category & root) {
|
void Logger::_initialize(log4cpp::Category & root) {
|
||||||
// log4cpp::Appender *appender = new log4cpp::FileAppender("default", LOG_FILE_PATH);
|
log4cpp::Appender *appender = new log4cpp::FileAppender("default", LOG_FILE_PATH);
|
||||||
log4cpp::Appender *appender = new log4cpp::OstreamAppender("console", &std::cout);
|
//log4cpp::Appender *appender = new log4cpp::OstreamAppender("console", &std::cout);
|
||||||
log4cpp::PatternLayout *layout = new log4cpp::PatternLayout();
|
log4cpp::PatternLayout *layout = new log4cpp::PatternLayout();
|
||||||
layout->setConversionPattern("%d{%Y-%m-%d %H:%M:%S.%l}%c %x: %m%n");
|
layout->setConversionPattern("%d{%Y-%m-%d %H:%M:%S.%l}%c %x: %m%n");
|
||||||
appender->setLayout(layout);
|
appender->setLayout(layout);
|
||||||
|
Loading…
Reference in New Issue
Block a user