BasicConfigurator.cpp
Go to the documentation of this file.
00001 /*
00002  * BasicConfigurator.cpp
00003  *
00004  * Copyright 2002, Log4cpp Project. All rights reserved.
00005  *
00006  * See the COPYING file for the terms of usage and distribution.
00007  */
00008 #include "PortabilityImpl.hh"
00009 
00010 #ifdef LOG4CPP_HAVE_IO_H
00011 #    include <io.h>
00012 #endif
00013 #ifdef LOG4CPP_HAVE_UNISTD_H
00014 #    include <unistd.h>
00015 #endif
00016 
00017 #include <cstdio>
00018 #include <log4cpp/BasicConfigurator.hh>
00019 #include <log4cpp/Category.hh>
00020 #include <log4cpp/FileAppender.hh>
00021 #include <log4cpp/Priority.hh>
00022 
00023 namespace log4cpp {
00024 
00025     void BasicConfigurator::configure() {
00026         Category& root = Category::getRoot();
00027         root.setPriority(Priority::INFO);
00028         root.removeAllAppenders();
00029         root.addAppender(new FileAppender("_", ::dup(fileno(stdout))));
00030     }
00031 
00032 }
00033 
00034 
00035 


log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sun Aug 14 2016 03:18:26