4
* Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5
* Copyright 2000, Bastiaan Bakker. All rights reserved.
7
* See the COPYING file for the terms of usage and distribution.
10
#ifndef _LOG4SHIB_LOGGINGEVENT_HH
11
#define _LOG4SHIB_LOGGINGEVENT_HH
13
#include <log4shib/Portability.hh>
16
#include <log4shib/Priority.hh>
17
#include <log4shib/TimeStamp.hh>
20
* The top level namespace for all 'Log for C++' types and classes.
25
* The internal representation of logging events. When a affirmative
26
* logging decision is made a <code>LoggingEvent</code> instance is
27
* created. This instance is passed around the different log4shib
30
* <p>This class is of concern to those wishing to extend log4shib.
32
struct LOG4SHIB_EXPORT LoggingEvent {
35
* Instantiate a LoggingEvent from the supplied parameters.
37
* <p>Except <code>timeStamp</code> all the other fields of
38
* <code>LoggingEvent</code> are filled when actually needed.
40
* @param category The category of this event.
41
* @param message The message of this event.
42
* @param ndc The nested diagnostic context of this event.
43
* @param priority The priority of this event.
45
LoggingEvent(const std::string& category, const std::string& message,
46
const std::string& ndc, Priority::Value priority);
49
/** The category name. */
50
const std::string categoryName;
52
/** The application supplied message of logging event. */
53
const std::string message;
55
/** The nested diagnostic context (NDC) of logging event. */
56
const std::string ndc;
58
/** Priority of logging event. */
59
Priority::Value priority;
61
/** The name of thread in which this logging event was generated,
64
const std::string threadName;
66
/** The number of seconds elapsed since the epoch
67
(1/1/1970 00:00:00 UTC) until logging event was created. */
72
#endif // _LOG4SHIB_LOGGINGEVENT_HH