org.andromda.core.common
Class AndroMDALogger

java.lang.Object
  org.andromda.core.common.AndroMDALogger

public class AndroMDALogger
extends Object

This is the logger used to write AndroMDA prefixed messages so that our informational logging is nice looking.

Since:
26.11.2003
Author:
Matthias Bohlen , Chad Brandon, Bob Fields

Constructor Summary
AndroMDALogger()
           
 
Method Summary
protected static void configure(URL logConfigurationXml)
          Configures the Logger from the passed in logConfigurationXml
static void debug(Object object)
           
static void error(Object object)
           
static String getNamespaceLogFileName(String namespace)
          Gets the name of the file to which namespace logging output will be written.
static Logger getNamespaceLogger(String namespaceName)
          Retrieves the namespace logger (if one is available) otherwise returns the root logger.
static String getNamespaceLoggerName(String namespace)
          Gets the name of the logger.
static Logger getSuffixLogger(String suffix)
          Gets a logger with suffixed name
static void info(Object object)
           
static void initialize()
          Configures logging for the AndroMDA application from the the xml resource "log4j.xml" found within the same package as this class.
static boolean isDebugEnabled()
          Returns true if the logger is debug enabled.
static void reset()
          Resets the logger to the default name.
static void setLoggingConfigurationUri(String loggingConfigurationUri)
          Sets the URI to an external logging configuration file.
static void setSuffix(String suffix)
          Allows us to add a suffix to the logger name.
static void shutdown()
          Shuts down the logger and releases any resources.
static void warn(Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndroMDALogger

public AndroMDALogger()
Method Detail

initialize

public static void initialize()
Configures logging for the AndroMDA application from the the xml resource "log4j.xml" found within the same package as this class.


setLoggingConfigurationUri

public static void setLoggingConfigurationUri(String loggingConfigurationUri)
Sets the URI to an external logging configuration file. This will override the default log4j.xml.

Parameters:
loggingConfigurationUri - the URI to the logging configuraiton file.

configure

protected static void configure(URL logConfigurationXml)
Configures the Logger from the passed in logConfigurationXml

Parameters:
logConfigurationXml -

getNamespaceLogger

public static Logger getNamespaceLogger(String namespaceName)
Retrieves the namespace logger (if one is available) otherwise returns the root logger.

Parameters:
namespaceName - the name of the namespace for which we'll retrieve the logger instance.
Returns:
the namespace or root logger instance.

getNamespaceLoggerName

public static String getNamespaceLoggerName(String namespace)
Gets the name of the logger.

Parameters:
namespace - the name of the namespace for which this logger is used.
Returns:
the logger name.

getNamespaceLogFileName

public static String getNamespaceLogFileName(String namespace)
Gets the name of the file to which namespace logging output will be written.

Parameters:
namespace - the name of the namespace for which this logger is used.
Returns:
the namespace logging file name.

setSuffix

public static void setSuffix(String suffix)
Allows us to add a suffix to the logger name.

Parameters:
suffix - the suffix to append to the logger name.

getSuffixLogger

public static Logger getSuffixLogger(String suffix)
Gets a logger with suffixed name

Parameters:
suffix - the suffix to append to the logger name.
Returns:
Logger instance

isDebugEnabled

public static boolean isDebugEnabled()
Returns true if the logger is debug enabled. Use before AndroMDALogger.debug calls where String concatenation or object manipulation in the method call occurs.

Returns:
true if the underlying logger is debug enabled

reset

public static void reset()
Resets the logger to the default name.


shutdown

public static void shutdown()
Shuts down the logger and releases any resources.


debug

public static void debug(Object object)
Parameters:
object -

info

public static void info(Object object)
Parameters:
object -

warn

public static void warn(Object object)
Parameters:
object -

error

public static void error(Object object)
Parameters:
object -


Copyright © 2003-2012 AndroMDA.org. All Rights Reserved.