/src/dcmtk/oflog/libsrc/rootlog.cc
Line | Count | Source |
1 | | // Module: Log4CPLUS |
2 | | // File: rootlogger.cxx |
3 | | // Created: 4/2003 |
4 | | // Author: Tad E. Smith |
5 | | // |
6 | | // |
7 | | // Copyright 2003-2010 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 | | |
21 | | #include "dcmtk/oflog/spi/rootlog.h" |
22 | | #include "dcmtk/oflog/helpers/loglog.h" |
23 | | #include "dcmtk/oflog/thread/syncpub.h" |
24 | | |
25 | | |
26 | | namespace dcmtk { |
27 | | namespace log4cplus { namespace spi { |
28 | | |
29 | | |
30 | | ////////////////////////////////////////////////////////////////////////////// |
31 | | // RootLogger Constructor |
32 | | ////////////////////////////////////////////////////////////////////////////// |
33 | | |
34 | | RootLogger::RootLogger(Hierarchy& h, LogLevel loglevel) |
35 | 6 | : LoggerImpl(DCMTK_LOG4CPLUS_TEXT("root"), h) |
36 | 6 | { |
37 | 6 | setLogLevel(loglevel); |
38 | 6 | } Unexecuted instantiation: dcmtk::log4cplus::spi::RootLogger::RootLogger(dcmtk::log4cplus::Hierarchy&, int) dcmtk::log4cplus::spi::RootLogger::RootLogger(dcmtk::log4cplus::Hierarchy&, int) Line | Count | Source | 35 | 6 | : LoggerImpl(DCMTK_LOG4CPLUS_TEXT("root"), h) | 36 | 6 | { | 37 | 6 | setLogLevel(loglevel); | 38 | 6 | } |
|
39 | | |
40 | | |
41 | | |
42 | | ////////////////////////////////////////////////////////////////////////////// |
43 | | // Logger Methods |
44 | | ////////////////////////////////////////////////////////////////////////////// |
45 | | |
46 | | LogLevel |
47 | | RootLogger::getChainedLogLevel() const |
48 | 0 | { |
49 | 0 | return ll; |
50 | 0 | } |
51 | | |
52 | | |
53 | | void |
54 | | RootLogger::setLogLevel(LogLevel loglevel) |
55 | 6 | { |
56 | 6 | if(loglevel == NOT_SET_LOG_LEVEL) { |
57 | 0 | helpers::getLogLog().error( |
58 | 0 | DCMTK_LOG4CPLUS_TEXT("You have tried to set NOT_SET_LOG_LEVEL to root.")); |
59 | 0 | } |
60 | 6 | else { |
61 | 6 | LoggerImpl::setLogLevel(loglevel); |
62 | 6 | } |
63 | 6 | } |
64 | | |
65 | | |
66 | | } } // namespace log4cplus { namespace spi { |
67 | | } // end namespace dcmtk |