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[] getContent ()
Level getLevel ()
Hierarchy getHierarchy ()
long getTime ()
uint getEpochSeconds ()
ulong getEpochMilliSeconds ()
uint getMilliSeconds ()
Event append (char[] x)

Static Public Member Functions

 this ()
ulong getUptime ()

Public Attributes

package Scratch scratch

Private Types

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

Private Attributes

char[] msg
char[] name
ulong time
Level level
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 78 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 55 of file ILevel.d.

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


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 156 of file Event.d.

References Exception, time, and version.

ulong getUptime  )  [inline, static]
 

Return the number of milliseconds since the executable was started.

Definition at line 215 of file Event.d.

References 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 240 of file Event.d.

References getUptime().

Referenced by LoggerInstance::append().

override char [] toString  )  [inline]
 

Return the message attached to this event.

Definition at line 272 of file Event.d.

Referenced by Layout::content().

char [] getName  )  [inline]
 

Return the name of the logger which produced this event

Definition at line 283 of file Event.d.

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

char [] getContent  )  [inline]
 

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

Definition at line 296 of file Event.d.

Referenced by XmlLayout::footer(), and XmlLayout::header().

Level getLevel  )  [inline]
 

Return the logger level of this event.

Definition at line 307 of file Event.d.

Referenced by Layout::levelString().

Hierarchy getHierarchy  )  [inline]
 

Return the hierarchy where the event was produced from

Definition at line 318 of file Event.d.

Referenced by XmlLayout::footer().

long getTime  )  [inline]
 

Return the time this event was produced

Definition at line 329 of file Event.d.

References time.

Referenced by SimpleTimerLayout::header().

uint getEpochSeconds  )  [inline]
 

Return the number of seconds since Jan 1st 1970

Definition at line 340 of file Event.d.

References time.

Referenced by DateLayout::header().

ulong getEpochMilliSeconds  )  [inline]
 

Return the number of milliseconds since Jan 1st 1970

Definition at line 351 of file Event.d.

References time.

Referenced by XmlLayout::header().

uint getMilliSeconds  )  [inline]
 

Isolate the millisecond portion of the event timestamp

Definition at line 362 of file Event.d.

References time.

Referenced by DateLayout::header().

Event append char[]  x  )  [inline]
 

Append some content to the scratch buffer. This is limited to the size of said buffer, and will not expand further.

Definition at line 374 of file Event.d.

Referenced by XmlLayout::footer(), XmlLayout::header(), SimpleTimerLayout::header(), and SimpleLayout::header().


Member Data Documentation

package Scratch scratch
 

Definition at line 86 of file Event.d.

Referenced by LoggerInstance::append(), XmlLayout::footer(), and DateLayout::header().

char [] msg [private]
 

Definition at line 87 of file Event.d.

char [] name [private]
 

Definition at line 87 of file Event.d.

ulong time [private]
 

Definition at line 89 of file Event.d.

Level level [private]
 

Definition at line 90 of file Event.d.

Hierarchy hierarchy [private]
 

Definition at line 91 of file Event.d.

uint epochTime [static, private]
 

Definition at line 93 of file Event.d.

ulong beginTime [static, private]
 

Definition at line 94 of file Event.d.


The documentation for this class was generated from the following file:
Generated on Tue Jan 25 21:18:32 2005 for Mango by doxygen 1.3.6