Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Event Class Reference

Inheritance diagram for Event:

ILevel List of all members.

Public Member Functions

void set (Hierarchy hierarchy, Level level, char[] msg, char[] name)
override char[] toString ()
char[] getName ()
char[] getScratch ()
Level getLevel ()
Hierarchy getHierarchy ()
long getTime ()
uint getEpochSeconds ()
ulong getEpochMilliSeconds ()
uint getMilliSeconds ()

Static Public Member Functions

 this ()
ulong getUptime ()

Private Types

enum  Level {
  Trace = 0, Info, Warn, Error,
  Fatal, None
}

Private Attributes

char[] msg
char[] name
ulong time
Level level
char[512] scratch
Hierarchy hierarchy

Static Private Attributes

uint epochTime
ulong beginTime

Detailed Description

Contains all information about a logging event, and is passed around between methods once it has been determined that the invoking logger is enabled for output.

Note that Event instances are maintained in a freelist rather than being allocated each time, and they include a scratchpad area for Layout formatters to use.

Definition at line 75 of file Event.d.


Member Enumeration Documentation

enum Level [inherited]
 

These represent the standard LOG4J event levels. Note that Debug is called Trace here, because debug is a reserved word in D (this needs to be fixed!).

Enumeration values:
Trace 
Info 
Warn 
Error 
Fatal 
None 

Definition at line 52 of file ILevel.d.

Referenced by CacheServer::LoaderThread::load(), TaskServer::TaskConsumer::notify(), CacheInvalidatee::notify(), Hierarchy::propogate(), ClusterThread::run(), ClusterQueue::run(), and PropertyConfigurator::this().


Member Function Documentation

this  )  [inline, static]
 

Setup the timing information for later use. Note how much effort it takes to get epoch time in Win32 ...

Definition at line 147 of file Event.d.

References epochTime, Exception, time, time, and version.

ulong getUptime  )  [inline, static]
 

Return the number of milliseconds since the executable was started.

Definition at line 206 of file Event.d.

References time, time, and version.

Referenced by set().

void set Hierarchy  hierarchy,
Level  level,
char[]  msg,
char[]  name
[inline]
 

Set the various attributes of this event.

Definition at line 231 of file Event.d.

References getUptime().

Referenced by LoggerInstance::append().

override char [] toString  )  [inline]
 

Return the message attached to this event.

Definition at line 263 of file Event.d.

Referenced by XmlLayout::format(), and DateLayout::format().

char [] getName  )  [inline]
 

Return the name of the logger which produced this event

Definition at line 274 of file Event.d.

Referenced by XmlLayout::format(), and DateLayout::format().

char [] getScratch  )  [inline]
 

Return the scratch buffer for formatting. This is a thread safe place to format data within, without allocating any memory.

Definition at line 287 of file Event.d.

References scratch.

Referenced by XmlLayout::format(), and DateLayout::format().

Level getLevel  )  [inline]
 

Return the logger level of this event.

Definition at line 298 of file Event.d.

References level.

Referenced by Layout::levelString().

Hierarchy getHierarchy  )  [inline]
 

Return the hierarchy where the event was produced from

Definition at line 309 of file Event.d.

References hierarchy.

Referenced by XmlLayout::format().

long getTime  )  [inline]
 

Return the time this event was produced

Definition at line 320 of file Event.d.

References time.

Referenced by SimpleTimerLayout::format().

uint getEpochSeconds  )  [inline]
 

Return the number of seconds since Jan 1st 1970

Definition at line 331 of file Event.d.

References epochTime, and time.

Referenced by DateLayout::format().

ulong getEpochMilliSeconds  )  [inline]
 

Return the number of milliseconds since Jan 1st 1970

Definition at line 342 of file Event.d.

References epochTime, and time.

Referenced by XmlLayout::format().

uint getMilliSeconds  )  [inline]
 

Isolate the millisecond portion of the event timestamp

Definition at line 353 of file Event.d.

References time.

Referenced by DateLayout::format().


Member Data Documentation

char [] msg [private]
 

Definition at line 77 of file Event.d.

char [] name [private]
 

Definition at line 77 of file Event.d.

ulong time [private]
 

Definition at line 79 of file Event.d.

Referenced by getEpochMilliSeconds(), getEpochSeconds(), getMilliSeconds(), getTime(), getUptime(), Event::VersionEventReset::reset(), and this().

Level level [private]
 

Definition at line 80 of file Event.d.

Referenced by getLevel(), and Event::VersionEventReset::reset().

char [512] scratch [private]
 

Definition at line 81 of file Event.d.

Referenced by getScratch().

Hierarchy hierarchy [private]
 

Definition at line 82 of file Event.d.

Referenced by getHierarchy().

uint epochTime [static, private]
 

Definition at line 84 of file Event.d.

Referenced by getEpochMilliSeconds(), getEpochSeconds(), and this().

ulong beginTime [static, private]
 

Definition at line 85 of file Event.d.


The documentation for this class was generated from the following file:
Generated on Sun Nov 7 19:07:01 2004 for Mango by doxygen 1.3.6