gremlin/libs/log4cplus/src/loggingevent.cxx

101 lines
2.3 KiB
C++

// Module: Log4CPLUS
// File: loggingevent.cxx
// Created: 6/2003
// Author: Tad E. Smith
//
//
// Copyright 2003-2009 Tad E. Smith
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <log4cplus/spi/loggingevent.h>
using namespace log4cplus;
using namespace log4cplus::spi;
#define LOG4CPLUS_DEFAULT_TYPE 1
///////////////////////////////////////////////////////////////////////////////
// InternalLoggingEvent dtor
///////////////////////////////////////////////////////////////////////////////
InternalLoggingEvent::~InternalLoggingEvent()
{
}
///////////////////////////////////////////////////////////////////////////////
// InternalLoggingEvent static methods
///////////////////////////////////////////////////////////////////////////////
unsigned int
InternalLoggingEvent::getDefaultType()
{
return LOG4CPLUS_DEFAULT_TYPE;
}
///////////////////////////////////////////////////////////////////////////////
// InternalLoggingEvent implementation
///////////////////////////////////////////////////////////////////////////////
const log4cplus::tstring&
InternalLoggingEvent::getMessage() const
{
return message;
}
unsigned int
InternalLoggingEvent::getType() const
{
return LOG4CPLUS_DEFAULT_TYPE;
}
std::auto_ptr<InternalLoggingEvent>
InternalLoggingEvent::clone() const
{
std::auto_ptr<InternalLoggingEvent> tmp(new InternalLoggingEvent(*this));
return tmp;
}
log4cplus::spi::InternalLoggingEvent&
InternalLoggingEvent::operator=(const log4cplus::spi::InternalLoggingEvent& rhs)
{
if(this == &rhs) return *this;
message = rhs.message;
loggerName = rhs.loggerName;
ll = rhs.ll;
ndc = rhs.getNDC();
thread = rhs.getThread();
timestamp = rhs.timestamp;
file = rhs.file;
line = rhs.line;
threadCached = true;
ndcCached = true;
return *this;
}