| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 | /******************************************************************************* copyright: Copyright (c) 2004 Kris Bell. All rights reserved license: BSD style: $(LICENSE) version: Initial release: May 2004 author: Kris *******************************************************************************/ module tango.util.log.model.ILogger; /******************************************************************************* *******************************************************************************/ interface ILogger { enum Level {Trace=0, Info, Warn, Error, Fatal, None}; /*********************************************************************** Is this logger enabed for the specified Level? ***********************************************************************/ @property bool enabled (Level level = Level.Fatal); /*********************************************************************** Append a trace message ***********************************************************************/ void trace (const(char[]) fmt, ...); /*********************************************************************** Append an info message ***********************************************************************/ void info (const(char[]) fmt, ...); /*********************************************************************** Append a warning message ***********************************************************************/ void warn (const(char[]) fmt, ...); /*********************************************************************** Append an error message ***********************************************************************/ void error (const(char[]) fmt, ...); /*********************************************************************** Append a fatal message ***********************************************************************/ void fatal (const(char[]) fmt, ...); /*********************************************************************** Return the name of this ILogger (sans the appended dot). ***********************************************************************/ @property const(char)[] name (); /*********************************************************************** Return the Level this logger is set to ***********************************************************************/ @property Level level (); /*********************************************************************** Set the current level for this logger (and only this logger). ***********************************************************************/ @property ILogger level (Level l); /*********************************************************************** Is this logger additive? That is, should we walk ancestors looking for more appenders? ***********************************************************************/ @property bool additive (); /*********************************************************************** Set the additive status of this logger. See isAdditive(). ***********************************************************************/ @property ILogger additive (bool enabled); /*********************************************************************** Send a message to this logger via its appender list. ***********************************************************************/ ILogger append (Level level, lazy const(char[]) exp); } |