org.apache.velocity.runtime.log
Class AvalonLogChute

java.lang.Object
  extended by org.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.

Since:
1.5
Version:
$Id: AvalonLogChute.java 685685 2008-08-13 21:43:27Z nbubna $
Author:
Jon S. Stevens, Geir Magnusson Jr., Nathan Bubna

Field Summary
static String AVALON_LOGGER
           
static String AVALON_LOGGER_FORMAT
           
static String AVALON_LOGGER_LEVEL
           
 
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
 

Field Detail

AVALON_LOGGER

public static final String AVALON_LOGGER
See Also:
Constant Field Values

AVALON_LOGGER_FORMAT

public static final String AVALON_LOGGER_FORMAT
See Also:
Constant Field Values

AVALON_LOGGER_LEVEL

public static final String AVALON_LOGGER_LEVEL
See Also:
Constant Field Values
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
See Also:
LogChute.init(org.apache.velocity.runtime.RuntimeServices)

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.

Parameters:
file -
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
t -

isLevelEnabled

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

Specified by:
isLevelEnabled in interface LogChute
Parameters:
level -
Returns:
True if the specified level is enabled.

finalize

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

Overrides:
finalize in class Object
Throws:
Throwable

shutdown

public void shutdown()
Close all destinations



Copyright © 2000-2008 The Apache Software Foundation. All Rights Reserved.