OFFIS DCMTK  Version 3.6.0
hierlock.h
Go to the documentation of this file.
1 // Module: Log4CPLUS
2 // File: hierarchylocker.h
3 // Created: 8/2003
4 // Author: Tad E. Smith
5 //
6 //
7 // Copyright 2003-2009 Tad E. Smith
8 //
9 // Licensed under the Apache License, Version 2.0 (the "License");
10 // you may not use this file except in compliance with the License.
11 // You may obtain a copy of the License at
12 //
13 // http://www.apache.org/licenses/LICENSE-2.0
14 //
15 // Unless required by applicable law or agreed to in writing, software
16 // distributed under the License is distributed on an "AS IS" BASIS,
17 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 // See the License for the specific language governing permissions and
19 // limitations under the License.
20 
23 #ifndef _LOG4CPLUS_HIERARCHY_LOCKER_HEADER_
24 #define _LOG4CPLUS_HIERARCHY_LOCKER_HEADER_
25 
26 #include "dcmtk/oflog/hierarchy.h"
27 
28 
29 namespace log4cplus {
30 
34  class LOG4CPLUS_EXPORT HierarchyLocker {
35  public:
36  // ctor & dtor
38  ~HierarchyLocker();
39 
43  void resetConfiguration();
44 
48  Logger getInstance(const log4cplus::tstring& name);
49 
53  Logger getInstance(const log4cplus::tstring& name, spi::LoggerFactory& factory);
54 
55  void addAppender(Logger &logger, log4cplus::SharedAppenderPtr& appender);
56 
57  private:
58  // Data
59  Hierarchy& h;
60  log4cplus::thread::Guard hierarchyLocker;
61  LoggerList loggerList;
62  };
63 
64 } // end namespace log4cplus
65 
66 #endif // _LOG4CPLUS_HIERARCHY_LOCKER_HEADER_
67 
This is used to lock a mutex.
Definition: threads.h:36
This is the central class in the log4cplus package.
Definition: logger.h:68
This is used to lock a Hierarchy.
Definition: hierlock.h:34
This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy...
Definition: hierarchy.h:59
a simple string class that implements a subset of std::string.
Definition: ofstring.h:86
Implement this interface to create new instances of Logger or a sub-class of Logger.
Definition: logfact.h:41


Generated on Wed Jan 4 2017 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.6