Thanks to visit codestin.com
Credit goes to sourceforge.net

Menu

[31e5cd]: / src / BasicConfigurator.cpp  Maximize  Restore  History

Download this file

33 lines (27 with data), 740 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* BasicConfigurator.cpp
*
* Copyright 2002, Log4cpp Project. All rights reserved.
*
* See the COPYING file for the terms of usage and distribution.
*/
#include "PortabilityImpl.hh"
#ifdef LOG4CPP_HAVE_IO_H
#include <io.h>
#endif
#ifdef LOG4CPP_HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <cstdio>
#include <log4cpp/BasicConfigurator.hh>
#include <log4cpp/Category.hh>
#include <log4cpp/FileAppender.hh>
#include <log4cpp/Priority.hh>
namespace log4cpp {
void BasicConfigurator::configure() {
Category& root = Category::getRoot();
root.setPriority(Priority::INFO);
root.removeAllAppenders();
root.addAppender(new FileAppender("_", ::dup(fileno(stdout))));
}
} // namespace log4cpp