eXo Kernel :: Commons Utils 2.4.9-GA

org.exoplatform.services.log
Class ExoLogger

java.lang.Object
  extended by org.exoplatform.services.log.ExoLogger

public abstract class ExoLogger
extends Object

The logger definition for exo platform.

ExoLogger it's wrapping factory for different Log factories existing in runtime for eXo.
The logger implements the Log interface for backward compatibility purpose.

This class is also the way to obtain a reference to a logger through the static methods getExoLogger(String) and getExoLogger(Class) .

The factory methods delegates to an instance of ExoLogFactory that is determined by the following rules

Version:
$Id: ExoLogger.java 34394 2009-07-23 09:23:31Z dkatayev $
Author:
Gennady Azarenkov

Constructor Summary
ExoLogger()
           
 
Method Summary
static Log getExoLogger(Class name)
          Returns a specified logger.
static Log getExoLogger(String name)
          Returns a specified logger.
static Log getLogger(Class name)
          Use instead getExoLogger(Class).
static Log getLogger(String name)
          Use instead getExoLogger(String).
static void setFactory(ExoLogFactory factory)
          Configures the exo logger factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExoLogger

public ExoLogger()
Method Detail

setFactory

public static void setFactory(ExoLogFactory factory)
                       throws IllegalArgumentException
Configures the exo logger factory. This method can be called multiple times to replace the current static instance.

Parameters:
factory - ExoLogFactory, the new factory
Throws:
IllegalArgumentException - when the factory is null

getLogger

public static Log getLogger(String name)
Use instead getExoLogger(String).

Parameters:
name - String, the logger name
Returns:
the logger

getLogger

public static Log getLogger(Class name)
Use instead getExoLogger(Class).

Parameters:
name - Class, the logger name
Returns:
the logger

getExoLogger

public static Log getExoLogger(String name)
                        throws IllegalArgumentException
Returns a specified logger.

Parameters:
name - the logger name
Returns:
the logger
Throws:
IllegalArgumentException - if the name is null

getExoLogger

public static Log getExoLogger(Class name)
                        throws IllegalArgumentException
Returns a specified logger.

Parameters:
name - the logger name
Returns:
the logger
Throws:
IllegalArgumentException - if the name is null

eXo Kernel :: Commons Utils 2.4.9-GA

Copyright © 2014 eXo Platform SAS. All Rights Reserved.