org.xwiki.component.logging
Class AbstractLogger

java.lang.Object
  extended by org.xwiki.component.logging.AbstractLogger
All Implemented Interfaces:
Logger
Direct Known Subclasses:
DefaultLogger

Deprecated. starting with 3.1M2 use SLF4J instead

@Deprecated
public abstract class AbstractLogger
extends Object
implements Logger

Helper methods to help in implementation of Loggers.

Since:
2.0M1
Version:
$Id: f187fb995cd870079da4eb8384653468f495b7f2 $

Constructor Summary
AbstractLogger()
          Deprecated.  
 
Method Summary
protected  String formatMessage(String message, Object... objects)
          Deprecated. Formats the message like MessageFormat.format(String, Object...) but also checks for Exceptions and catches them as logging should be robust and not interfere with normal program flow.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xwiki.component.logging.Logger
debug, debug, debug, debug, error, error, error, error, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isWarnEnabled, warn, warn, warn, warn
 

Constructor Detail

AbstractLogger

public AbstractLogger()
Deprecated. 
Method Detail

formatMessage

protected String formatMessage(String message,
                               Object... objects)
Deprecated. 
Formats the message like MessageFormat.format(String, Object...) but also checks for Exceptions and catches them as logging should be robust and not interfere with normal program flow. The Exception caught will be passed to the loggers debug output.

Parameters:
message - message in Formatter format syntax
objects - Objects to fill in
Returns:
the formatted String if possible, else the message and all objects concatenated.
See Also:
MessageFormat


Copyright © 2004–2014 XWiki. All rights reserved.