org.apache.velocity.runtime.log
Class AvalonLogChute

java.lang.Object
  extended byorg.apache.velocity.runtime.log.AvalonLogChute
All Implemented Interfaces:
LogChute
Direct Known Subclasses:
AvalonLogSystem

public class AvalonLogChute
extends Object
implements LogChute

Implementation of a Avalon logger.

Version:
$Id: AvalonLogChute.java 383599 2006-03-06 17:52:45Z nbubna $
Author:
Jon S. Stevens, Geir Magnusson Jr., Nathan Bubna

Field Summary
 
Fields inherited from interface org.apache.velocity.runtime.log.LogChute
DEBUG_ID, DEBUG_PREFIX, ERROR_ID, ERROR_PREFIX, INFO_ID, INFO_PREFIX, TRACE_ID, TRACE_PREFIX, WARN_ID, WARN_PREFIX
 
Constructor Summary
AvalonLogChute()
           
 
Method Summary
protected  void finalize()
          Also do a shutdown if the object is destroy()'d.
 void init(RuntimeServices rs)
          Initializes this LogChute.
 void init(String file)
          Deprecated. This method should not be used. It is here only to provide backwards compatibility for the deprecated AvalonLogSystem class, in case anyone used it and this method directly.
 boolean isLevelEnabled(int level)
          Checks to see whether the specified level is enabled.
 void log(int level, String message)
          logs messages
 void log(int level, String message, Throwable t)
          logs messages and error
 void shutdown()
          Close all destinations
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvalonLogChute

public AvalonLogChute()
Method Detail

init

public void init(RuntimeServices rs)
          throws Exception
Description copied from interface: LogChute
Initializes this LogChute.

Specified by:
init in interface LogChute
Throws:
Exception

init

public void init(String file)
          throws Exception
Deprecated. This method should not be used. It is here only to provide backwards compatibility for the deprecated AvalonLogSystem class, in case anyone used it and this method directly.

Throws:
Exception

log

public void log(int level,
                String message)
logs messages

Specified by:
log in interface LogChute
Parameters:
level - severity level
message - complete error message

log

public void log(int level,
                String message,
                Throwable t)
logs messages and error

Specified by:
log in interface LogChute
Parameters:
level - severity level
message - complete error message

isLevelEnabled

public boolean isLevelEnabled(int level)
Checks to see whether the specified level is enabled.

Specified by:
isLevelEnabled in interface LogChute

finalize

protected void finalize()
                 throws Throwable
Also do a shutdown if the object is destroy()'d.

Throws:
Throwable

shutdown

public void shutdown()
Close all destinations



Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.