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


log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sun Jun 23 2019 19:14:17