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

ILogger Struct Reference

Inheritance diagram for ILogger:

ILevel Logger LoggerInstance List of all members.

Public Types

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

Public Member Functions

void trace (char[] msg)
void info (char[] msg)
void warn (char[] msg)
void error (char[] msg)
void fatal (char[] msg)
char[] getName ()
Level getLevel ()
void setLevel (Level level)
void setLevel (Level level, bool force)
bool isEnabled (Level level)
bool isAdditive ()
void setAdditive (bool enabled)
ulong getUptime ()

Detailed Description

This is the primary API to the log package. Use the two static methods to access and/or create Logger instances, and the other methods to modify specific Logger attributes.

See this page for the official Log4J documentation. Mango.log closely follows both the API and the behaviour as documented at the official site.

Definition at line 52 of file ILogger.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

void trace char[]  msg  ) 
 

Add a trace messages. This is called 'debug' in Log4J but that is a reserved word in the D language. This needs some more thought.

Reimplemented in LoggerInstance, and Logger.

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

void info char[]  msg  ) 
 

Add an info message

Reimplemented in LoggerInstance, and Logger.

Referenced by ClusterServer::addCacheLoader(), TaskServer::addConsumer(), Cluster::createConsumer(), TaskServer::TaskConsumer::notify(), ClusterThread::run(), and AbstractServer::start().

void warn char[]  msg  ) 
 

Add a warning message

Reimplemented in LoggerInstance, and Logger.

void error char[]  msg  ) 
 

Add an error message

Reimplemented in LoggerInstance, and Logger.

Referenced by TaskServer::TaskConsumer::notify(), ServerThread::run(), ClusterThread::run(), and ClusterQueue::run().

void fatal char[]  msg  ) 
 

Add a fatal message

Reimplemented in LoggerInstance, and Logger.

Referenced by ServerThread::run(), and ClusterThread::run().

char [] getName  ) 
 

Return the name of this Logger

Reimplemented in LoggerInstance, and Logger.

Level getLevel  ) 
 

Return the current level assigned to this logger

Reimplemented in LoggerInstance, and Logger.

void setLevel Level  level  ) 
 

Set the activity level of this logger. Levels control how much information is emitted during runtime, and relate to each other as follows:

Trace < Info < Warn < Error < Fatal < None

That is, if the level is set to Error, only calls to the error() and fatal() methods will actually produce output: all others will be inhibited.

Note that Log4J is a hierarchical environment, and each logger defaults to inheriting a level from its parent.

Reimplemented in LoggerInstance, and Logger.

void setLevel Level  level,
bool  force
 

same as setLevel (Level), but with additional control over whether the children are forced to accept the changed level or not. If 'force' is false, then children adopt the parent level only if they have their own level set to Level.None

Reimplemented in LoggerInstance, and Logger.

bool isEnabled Level  level  ) 
 

Is this logger enabled for the provided level?

Reimplemented in LoggerInstance, and Logger.

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

bool isAdditive  ) 
 

Return whether this logger uses additive appenders or not. See setAdditive().

Reimplemented in LoggerInstance, and Logger.

void setAdditive bool  enabled  ) 
 

Specify whether or not this logger has additive behaviour. This is enabled by default, and causes a logger to invoke all appenders within its ancestry (until an ancestor is found with an additive attribute of false).

Reimplemented in LoggerInstance, and Logger.

ulong getUptime  ) 
 

Get number of milliseconds since this application started

Reimplemented in LoggerInstance, and Logger.


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