org.xulux.api.logging
Interface ILog


public interface ILog

The log interface. You need to implement this interface if you want to support a logger (eg commons-logging, log4j, jdk logging); It is assumed that the implementor provides a setName(String name);

Version:
$Id: ILog.java,v 1.1 2005/12/18 12:58:17 mvdb Exp $
Author:
Martin van den Bemt

Field Summary
static int ALL
          Use the default log level..
static int DEBUG
           
static int DEFAULT
          Default is level ERROR.
static int ERROR
           
static int FATAL
           
static int INFO
           
static int OFF
           
static int WARN
           
 
Method Summary
 void destroy()
          destroy the log
 java.lang.String getName()
           
 void init(java.lang.String name)
          Initialize the log
 void log(int level, java.lang.String name, java.lang.String message)
          Log a message
 void log(int level, java.lang.String name, java.lang.String message, java.lang.Throwable t)
          Log a message
 

Field Detail

ALL

static final int ALL
Use the default log level..

See Also:
Constant Field Values

DEBUG

static final int DEBUG
See Also:
Constant Field Values

INFO

static final int INFO
See Also:
Constant Field Values

WARN

static final int WARN
See Also:
Constant Field Values

ERROR

static final int ERROR
See Also:
Constant Field Values

FATAL

static final int FATAL
See Also:
Constant Field Values

OFF

static final int OFF
See Also:
Constant Field Values

DEFAULT

static final int DEFAULT
Default is level ERROR.

See Also:
Constant Field Values
Method Detail

init

void init(java.lang.String name)
Initialize the log

Parameters:
name - the name the logger is registered under.

destroy

void destroy()
destroy the log


log

void log(int level,
         java.lang.String name,
         java.lang.String message)
Log a message

Parameters:
level - the level to use
name - the name to use (used as eg a prefix in the logging output)
message - the log message

log

void log(int level,
         java.lang.String name,
         java.lang.String message,
         java.lang.Throwable t)
Log a message

Parameters:
level - the level to use
name - the name to use (used as eg a prefix in the logging output)
message - the log message
t - the exception to log

getName

java.lang.String getName()
Returns:
the logger name (the name under which the logger is registered


Copyright © 2002-2007 Martin van den Bemt. All Rights Reserved.