OFFIS DCMTK
Version 3.6.0
Main Page
Related Pages
Classes
Files
File List
File Members
oflog
include
dcmtk
oflog
spi
logimpl.h
Go to the documentation of this file.
1
// Module: Log4CPLUS
2
// File: loggerimpl.h
3
// Created: 6/2001
4
// Author: Tad E. Smith
5
//
6
//
7
// Copyright 2001-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_SPI_LOGGER_HEADER_
24
#define _LOG4CPLUS_SPI_LOGGER_HEADER_
25
26
#include "dcmtk/oflog/config.h"
27
#include "
dcmtk/oflog/tstring.h
"
28
#include "
dcmtk/oflog/helpers/apndimpl.h
"
29
#include "
dcmtk/oflog/helpers/pointer.h
"
30
#include "
dcmtk/oflog/spi/logfact.h
"
31
//#include <memory>
32
//#include <vector>
33
34
35
namespace
log4cplus {
36
class
DefaultLoggerFactory;
37
38
namespace
spi {
39
48
class
LOG4CPLUS_EXPORT
LoggerImpl
49
:
public
virtual
log4cplus::helpers::SharedObject
,
50
public
log4cplus::helpers::AppenderAttachableImpl
51
{
52
public
:
53
typedef
helpers::SharedObjectPtr<LoggerImpl>
SharedLoggerImplPtr
;
54
55
// Methods
56
68
virtual
void
callAppenders(
const
InternalLoggingEvent
& event);
69
74
virtual
void
closeNestedAppenders();
75
82
virtual
bool
isEnabledFor(LogLevel ll)
const
;
83
87
virtual
void
log(LogLevel ll,
const
log4cplus::tstring
& message,
88
const
char
* file=NULL,
int
line=-1,
89
const
char
*
function
=NULL);
90
99
virtual
LogLevel getChainedLogLevel()
const
;
100
106
LogLevel
getLogLevel
()
const
{
return
this->ll; }
107
111
void
setLogLevel
(LogLevel _ll) { this->ll = _ll; }
112
117
virtual
Hierarchy
& getHierarchy()
const
;
118
122
log4cplus::tstring
getName
()
const
{
return
name; }
123
127
bool
getAdditivity()
const
;
128
132
void
setAdditivity(
bool
additive);
133
134
virtual
~
LoggerImpl
();
135
136
protected
:
137
// Ctors
148
LoggerImpl
(
const
log4cplus::tstring
& name,
Hierarchy
& h);
149
150
151
// Methods
156
virtual
void
forcedLog(LogLevel ll,
157
const
log4cplus::tstring
& message,
158
const
char
* file=NULL,
159
int
line=-1,
160
const
char
*
function
=NULL);
161
162
163
// Data
165
log4cplus::tstring
name
;
166
170
LogLevel
ll
;
171
176
SharedLoggerImplPtr
parent
;
177
187
bool
additive
;
188
189
private
:
190
// Data
192
Hierarchy
&
hierarchy
;
193
194
// Disallow copying of instances of this class
195
LoggerImpl
(
const
LoggerImpl
&);
196
LoggerImpl
& operator=(
const
LoggerImpl
&);
197
198
// Friends
199
friend
class
log4cplus::Logger
;
200
friend
class
log4cplus::DefaultLoggerFactory
;
201
friend
class
log4cplus::Hierarchy
;
202
};
203
204
typedef
LoggerImpl::SharedLoggerImplPtr
SharedLoggerImplPtr
;
205
206
}
// end namespace spi
207
}
// end namespace log4cplus
208
209
#endif // _LOG4CPLUS_SPI_LOGGER_HEADER_
210
211
Generated on Thu Dec 20 2012 for
OFFIS DCMTK
Version 3.6.0 by
Doxygen
1.8.2