org.arakhne.logging
Class SunLogger

java.lang.Object
  extended by org.arakhne.logging.AbstractLogger
      extended by org.arakhne.logging.SunLogger
All Implemented Interfaces:
Logger

public class SunLogger
extends AbstractLogger

This class provides the concrete implementation of the Logger interface. This impl is based on the Sun's Logging Facade for Java

Version:
1.7 (rev:285) 2011-10-14 12:02:59
Author:
Stéphane GALLAND
See Also:
Logger
Maven Group Id:
org.arakhne.afc
Maven Artifact Id:
arakhneLogger

Constructor Summary
SunLogger()
          Create an unamed logger based of Sun's logging system.
SunLogger(String name)
          Create a named logger based of Sun's logging system.
 
Method Summary
 String getName()
          
 void log(Object source, LogLevel level, String msg)
          
 void log(Object source, LogLevel level, String msg, Throwable exception)
          
 void setLogLevel(LogLevel level)
          Set the minimum log level.
protected  Level toSunLevel(LogLevel level)
          Translate a logging level into the same thing for Sun's logging system.
 
Methods inherited from class org.arakhne.logging.AbstractLogger
addLoggerEventListener, debug, debug, error, error, fireLoggerEvent, fireLoggerEvent, getLogLevel, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isLoggableFor, isWarnEnabled, removeLoggerEventListener, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SunLogger

public SunLogger()
Create an unamed logger based of Sun's logging system.


SunLogger

public SunLogger(String name)
Create a named logger based of Sun's logging system.

Parameters:
name - is the name of the logger.
Method Detail

toSunLevel

protected Level toSunLevel(LogLevel level)
Translate a logging level into the same thing for Sun's logging system.

Parameters:
level - is the level to translate
Returns:
the Sun's level

log

public void log(Object source,
                LogLevel level,
                String msg)

Specified by:
log in interface Logger
Overrides:
log in class AbstractLogger
Parameters:
source - - the object which send this log
level - - the log level
msg - - the message to log

log

public void log(Object source,
                LogLevel level,
                String msg,
                Throwable exception)

Parameters:
source - - the object which send this log
level - - the log level
msg - - the message to log
exception - - the exception cause of the log message

getName

public String getName()

Returns:

setLogLevel

public void setLogLevel(LogLevel level)
Set the minimum log level.

Specified by:
setLogLevel in interface Logger
Overrides:
setLogLevel in class AbstractLogger
Parameters:
level -


Copyright © 2006-2011 Arakhnê.org Consortium. All rights reserved under LGPL license terms.