2 // File: loggingevent.cxx
4 // Author: Tad E. Smith
7 // Copyright 2003-2009 Tad E. Smith
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
13 // http://www.apache.org/licenses/LICENSE-2.0
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.
21 #include <log4cplus/spi/loggingevent.h>
24 using namespace log4cplus
;
25 using namespace log4cplus::spi
;
28 #define LOG4CPLUS_DEFAULT_TYPE 1
31 ///////////////////////////////////////////////////////////////////////////////
32 // InternalLoggingEvent dtor
33 ///////////////////////////////////////////////////////////////////////////////
35 InternalLoggingEvent::~InternalLoggingEvent()
41 ///////////////////////////////////////////////////////////////////////////////
42 // InternalLoggingEvent static methods
43 ///////////////////////////////////////////////////////////////////////////////
46 InternalLoggingEvent::getDefaultType()
48 return LOG4CPLUS_DEFAULT_TYPE
;
53 ///////////////////////////////////////////////////////////////////////////////
54 // InternalLoggingEvent implementation
55 ///////////////////////////////////////////////////////////////////////////////
57 const log4cplus::tstring
&
58 InternalLoggingEvent::getMessage() const
65 InternalLoggingEvent::getType() const
67 return LOG4CPLUS_DEFAULT_TYPE
;
72 std::auto_ptr
<InternalLoggingEvent
>
73 InternalLoggingEvent::clone() const
75 std::auto_ptr
<InternalLoggingEvent
> tmp(new InternalLoggingEvent(*this));
81 log4cplus::spi::InternalLoggingEvent
&
82 InternalLoggingEvent::operator=(const log4cplus::spi::InternalLoggingEvent
& rhs
)
84 if(this == &rhs
) return *this;
86 message
= rhs
.message
;
87 loggerName
= rhs
.loggerName
;
90 thread
= rhs
.getThread();
91 timestamp
= rhs
.timestamp
;