log4tango 5.0.2
LoggingEvent.hh
Go to the documentation of this file.
1//
2// LoggingEvent.hh
3//
4// Copyright (C) : 2000 - 2002
5// LifeLine Networks BV (www.lifeline.nl). All rights reserved.
6// Bastiaan Bakker. All rights reserved.
7//
8// 2004,2005,2006,2007,2008,2009,2010,2011,2012
9// Synchrotron SOLEIL
10// L'Orme des Merisiers
11// Saint-Aubin - BP 48 - France
12//
13// This file is part of log4tango.
14//
15// Log4ango is free software: you can redistribute it and/or modify
16// it under the terms of the GNU Lesser General Public License as published by
17// the Free Software Foundation, either version 3 of the License, or
18// (at your option) any later version.
19//
20// Log4tango is distributed in the hope that it will be useful,
21// but WITHOUT ANY WARRANTY; without even the implied warranty of
22// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23// GNU Lesser General Public License for more details.
24//
25// You should have received a copy of the GNU Lesser General Public License
26// along with Log4Tango. If not, see <http://www.gnu.org/licenses/>.
27
28#ifndef _LOG4TANGO_LOGGINGEVENT_H
29#define _LOG4TANGO_LOGGINGEVENT_H
30
32#include <string>
33
34#include <log4tango/Level.hh>
36
37namespace log4tango {
38
47//-----------------------------------------------------------------------------
48// struct : LoggingEvent
49//-----------------------------------------------------------------------------
51{
52public:
63#ifdef LOG4TANGO_HAS_NDC
64 LoggingEvent(const std::string& logger,
65 const std::string& message,
66 const std::string& ndc,
67 Level::Value level);
68#else
69 LoggingEvent(const std::string& logger,
70 const std::string& message,
71 Level::Value level);
72#endif // LOG4TANGO_HAS_NDC
73
75 LoggingEvent(const LoggingEvent& event);
76
78 const std::string logger_name;
79
81 const std::string message;
82
83#ifdef LOG4TANGO_HAS_NDC
85 const std::string ndc;
86#endif
87
90
92 std::string thread_name;
93
96
100
101private:
103 const LoggingEvent& operator= (const LoggingEvent&);
104};
105
106} // namespace log4tango
107
108#endif // _LOG4TANGO_LOGGINGEVENT_H
109
#define LOG4TANGO_EXPORT
Definition: Export.hh:38
int Value
The type of Level Values.
Definition: Level.hh:98
Definition: TimeStamp.hh:39
Definition: Appender.hh:40
The internal representation of logging events.
Definition: LoggingEvent.hh:51
Level::Value level
Level of logging event.
Definition: LoggingEvent.hh:89
std::string thread_name
Name of thread in which this logging event was generated.
Definition: LoggingEvent.hh:92
TimeStamp timestamp
The number of seconds elapsed since the epoch (1/1/1970 00:00:00 UTC) until logging event was created...
Definition: LoggingEvent.hh:99
const std::string message
The application supplied message of logging event.
Definition: LoggingEvent.hh:81
long thread_id
id of thread in which this logging event was generated
Definition: LoggingEvent.hh:95
const std::string logger_name
The logger name.
Definition: LoggingEvent.hh:78