Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
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>
18
#include <
log4cpp/BasicConfigurator.hh
>
19
#include <
log4cpp/Category.hh
>
20
#include <
log4cpp/FileAppender.hh
>
21
#include <
log4cpp/Priority.hh
>
22
23
namespace
log4cpp
{
24
25
void
BasicConfigurator::configure
() {
26
Category
& root =
Category::getRoot
();
27
root.
setPriority
(
Priority::INFO
);
28
root.
removeAllAppenders
();
29
root.
addAppender
(
new
FileAppender
(
"_"
, ::dup(fileno(stdout))));
30
}
31
32
}
33
34
35
log4cpp::Priority::INFO
Definition:
Priority.hh:77
log4cpp::Category
Definition:
Category.hh:33
log4cpp::FileAppender
Definition:
FileAppender.hh:20
PortabilityImpl.hh
log4cpp::Category::removeAllAppenders
virtual void removeAllAppenders()
Definition:
Category.cpp:151
log4cpp::Category::getRoot
static Category & getRoot()
Definition:
Category.cpp:23
log4cpp
Definition:
AbortAppender.hh:16
log4cpp::Category::setPriority
virtual void setPriority(Priority::Value priority)
Definition:
Category.cpp:71
Category.hh
log4cpp::Category::addAppender
virtual void addAppender(Appender *appender)
Definition:
Category.cpp:94
FileAppender.hh
log4cpp::BasicConfigurator::configure
static void configure()
Definition:
BasicConfigurator.cpp:25
Priority.hh
BasicConfigurator.hh
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