log4shib 2.0.0

PropertyConfiguratorImpl.hh
Go to the documentation of this file.
1/*
2 * PropertyConiguratorImpl.hh
3 *
4 * Copyright 2002, Log4cpp Project. All rights reserved.
5 *
6 * See the COPYING file for the terms of usage and distribution.
7 */
8
9#ifndef _LOG4SHIB_PROPERTYCONFIGURATORIMPL_HH
10#define _LOG4SHIB_PROPERTYCONFIGURATORIMPL_HH
11
12#include "PortabilityImpl.hh"
13#include <log4shib/Configurator.hh>
14#include <log4shib/Appender.hh>
15#include <log4shib/Category.hh>
16#include <string>
17#include <iostream>
18#include <map>
19#include <vector>
20
21#include "Properties.hh"
22
23 namespace log4shib {
24
25 class PropertyConfiguratorImpl {
26 public:
27 typedef std::map<std::string, Appender*> AppenderMap;
28
29 PropertyConfiguratorImpl();
30 virtual ~PropertyConfiguratorImpl();
31 virtual void doConfigure(const std::string& initFileName)
32 throw (ConfigureFailure);
33 virtual void doConfigure(std::istream& in)
34 throw (ConfigureFailure);
35
36 protected:
45 void configureCategory(const std::string& categoryname) throw (ConfigureFailure);
46
52 void getCategories(std::vector<std::string>& categories) const;
53
54 void instantiateAllAppenders() throw(ConfigureFailure);
55
69 Appender* instantiateAppender(const std::string& name);
70
77 void setLayout(Appender* appender, const std::string& name);
78
79 Properties _properties;
80 AppenderMap _allAppenders;
81 };
82}
83
84#endif // _LOG4SHIB_PROPERTIES_HH
85
Appender.hh
Category.hh
Configurator.hh
PortabilityImpl.hh
Properties.hh
log4shib::Appender
Implement this interface for your own strategies for printing log statements.
Definition: Appender.hh:33
log4shib::ConfigureFailure
Exception class for configuration.
Definition: Configurator.hh:26
log4shib::Properties
Definition: Properties.hh:19
log4shib::PropertyConfiguratorImpl
Definition: PropertyConfiguratorImpl.hh:25
log4shib::PropertyConfiguratorImpl::instantiateAllAppenders
void instantiateAllAppenders()
Definition: PropertyConfiguratorImpl.cpp:92
log4shib::PropertyConfiguratorImpl::~PropertyConfiguratorImpl
virtual ~PropertyConfiguratorImpl()
Definition: PropertyConfiguratorImpl.cpp:62
log4shib::PropertyConfiguratorImpl::_allAppenders
AppenderMap _allAppenders
Definition: PropertyConfiguratorImpl.hh:80
log4shib::PropertyConfiguratorImpl::getCategories
void getCategories(std::vector< std::string > &categories) const
Get a list of categories for which we should do the configuration.
Definition: PropertyConfiguratorImpl.cpp:340
log4shib::PropertyConfiguratorImpl::PropertyConfiguratorImpl
PropertyConfiguratorImpl()
Definition: PropertyConfiguratorImpl.cpp:59
log4shib::PropertyConfiguratorImpl::AppenderMap
std::map< std::string, Appender * > AppenderMap
Definition: PropertyConfiguratorImpl.hh:27
log4shib::PropertyConfiguratorImpl::doConfigure
virtual void doConfigure(const std::string &initFileName)
Definition: PropertyConfiguratorImpl.cpp:65
log4shib::PropertyConfiguratorImpl::instantiateAppender
Appender * instantiateAppender(const std::string &name)
Intantiate and configure the appender referred to by the given name.
Definition: PropertyConfiguratorImpl.cpp:199
log4shib::PropertyConfiguratorImpl::configureCategory
void configureCategory(const std::string &categoryname)
configure the given category.
Definition: PropertyConfiguratorImpl.cpp:134
log4shib::PropertyConfiguratorImpl::setLayout
void setLayout(Appender *appender, const std::string &name)
Method for instantiating and configuring the layouts associated with each appender.
Definition: PropertyConfiguratorImpl.cpp:290
log4shib::PropertyConfiguratorImpl::_properties
Properties _properties
Definition: PropertyConfiguratorImpl.hh:79
log4shib
The top level namespace for all 'Log for C++' types and classes.
Definition: AbortAppender.hh:16
std
Definition: Portability.hh:37