com.iparelan.util.logging.impl
Class LoggerImpl

java.lang.Object
  extended by com.iparelan.util.logging.impl.LoggerImpl
All Implemented Interfaces:
Logger

@Copyright(value="Copyright © 2008, Iparelan Solutions, LLC. All rights reserved.")
public final class LoggerImpl
extends Object
implements Logger

A Java Logging API Logger implementation.

Version:
July 2008
Author:
Greg Mattes

Field Summary
(package private)  Logger delegate
           
private static ConcurrentMap<String,Logger> loggerCache
           
 
Constructor Summary
private LoggerImpl(String name)
           
 
Method Summary
 void config(String msg)
          Logs a message at the config level.
 void config(String msg, Throwable throwable)
          Logs a message at the config level.
 void fine(String msg)
          Logs a message at the fine level.
 void fine(String msg, Throwable throwable)
          Logs a message at the fine level.
 void finer(String msg)
          Logs a message at the finer level.
 void finer(String msg, Throwable throwable)
          Logs a message at the finer level.
 void finest(String msg)
          Logs a message at the finest level.
 void finest(String msg, Throwable throwable)
          Logs a message at the finest level.
static Logger getLogger(String name)
           
 void info(String msg)
          Logs a message at the info level.
 void info(String msg, Throwable throwable)
          Logs a message at the info level.
 boolean isLoggableConfig()
          Tells whether messages at the config level will be logged.
 boolean isLoggableFine()
          Tells whether messages at the fine level will be logged.
 boolean isLoggableFiner()
          Tells whether messages at the finer level will be logged.
 boolean isLoggableFinest()
          Tells whether messages at the finest level will be logged.
 boolean isLoggableInfo()
          Tells whether messages at the info level will be logged.
 boolean isLoggableSevere()
          Tells whether messages at the severe level will be logged.
 boolean isLoggableWarning()
          Tells whether messages at the warning level will be logged.
 void severe(String msg)
          Logs a message at the severe level.
 void severe(String msg, Throwable throwable)
          Logs a message at the severe level.
 void warning(String msg)
          Logs a message at the warning level.
 void warning(String msg, Throwable throwable)
          Logs a message at the warning level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loggerCache

private static final ConcurrentMap<String,Logger> loggerCache

delegate

final Logger delegate
Constructor Detail

LoggerImpl

private LoggerImpl(String name)
Method Detail

getLogger

public static Logger getLogger(String name)

config

public void config(String msg)
Description copied from interface: Logger
Logs a message at the config level.

Specified by:
config in interface Logger
Parameters:
msg - The log message. May not be null.

config

public void config(String msg,
                   Throwable throwable)
Description copied from interface: Logger
Logs a message at the config level.

Specified by:
config in interface Logger
Parameters:
msg - The log message. May not be null.
throwable - The throwable associated with the log message. May not be null.

fine

public void fine(String msg)
Description copied from interface: Logger
Logs a message at the fine level.

Specified by:
fine in interface Logger
Parameters:
msg - The log message. May not be null.

fine

public void fine(String msg,
                 Throwable throwable)
Description copied from interface: Logger
Logs a message at the fine level.

Specified by:
fine in interface Logger
Parameters:
msg - The log message. May not be null.
throwable - The throwable associated with the log message. May not be null.

finer

public void finer(String msg)
Description copied from interface: Logger
Logs a message at the finer level.

Specified by:
finer in interface Logger
Parameters:
msg - The log message. May not be null.

finer

public void finer(String msg,
                  Throwable throwable)
Description copied from interface: Logger
Logs a message at the finer level.

Specified by:
finer in interface Logger
Parameters:
msg - The log message. May not be null.
throwable - The throwable associated with the log message. May not be null.

finest

public void finest(String msg)
Description copied from interface: Logger
Logs a message at the finest level.

Specified by:
finest in interface Logger
Parameters:
msg - The log message. May not be null.

finest

public void finest(String msg,
                   Throwable throwable)
Description copied from interface: Logger
Logs a message at the finest level.

Specified by:
finest in interface Logger
Parameters:
msg - The log message. May not be null.
throwable - The throwable associated with the log message. May not be null.

info

public void info(String msg)
Description copied from interface: Logger
Logs a message at the info level.

Specified by:
info in interface Logger
Parameters:
msg - The log message. May not be null.

info

public void info(String msg,
                 Throwable throwable)
Description copied from interface: Logger
Logs a message at the info level.

Specified by:
info in interface Logger
Parameters:
msg - The log message. May not be null.
throwable - The throwable associated with the log message. May not be null.

severe

public void severe(String msg)
Description copied from interface: Logger
Logs a message at the severe level.

Specified by:
severe in interface Logger
Parameters:
msg - The log message. May not be null.

severe

public void severe(String msg,
                   Throwable throwable)
Description copied from interface: Logger
Logs a message at the severe level.

Specified by:
severe in interface Logger
Parameters:
msg - The log message. May not be null.
throwable - The throwable associated with the log message. May not be null.

warning

public void warning(String msg)
Description copied from interface: Logger
Logs a message at the warning level.

Specified by:
warning in interface Logger
Parameters:
msg - The log message. May not be null.

warning

public void warning(String msg,
                    Throwable throwable)
Description copied from interface: Logger
Logs a message at the warning level.

Specified by:
warning in interface Logger
Parameters:
msg - The log message. May not be null.
throwable - The throwable associated with the log message. May not be null.

isLoggableConfig

public boolean isLoggableConfig()
Description copied from interface: Logger
Tells whether messages at the config level will be logged.

Specified by:
isLoggableConfig in interface Logger
Returns:
true if messages will be logged at the config level, otherwise false.

isLoggableFine

public boolean isLoggableFine()
Description copied from interface: Logger
Tells whether messages at the fine level will be logged.

Specified by:
isLoggableFine in interface Logger
Returns:
true if messages will be logged at the fine level, otherwise false.

isLoggableFiner

public boolean isLoggableFiner()
Description copied from interface: Logger
Tells whether messages at the finer level will be logged.

Specified by:
isLoggableFiner in interface Logger
Returns:
true if messages will be logged at the finer level, otherwise false.

isLoggableFinest

public boolean isLoggableFinest()
Description copied from interface: Logger
Tells whether messages at the finest level will be logged.

Specified by:
isLoggableFinest in interface Logger
Returns:
true if messages will be logged at the finest level, otherwise false.

isLoggableInfo

public boolean isLoggableInfo()
Description copied from interface: Logger
Tells whether messages at the info level will be logged.

Specified by:
isLoggableInfo in interface Logger
Returns:
true if messages will be logged at the info level, otherwise false.

isLoggableSevere

public boolean isLoggableSevere()
Description copied from interface: Logger
Tells whether messages at the severe level will be logged.

Specified by:
isLoggableSevere in interface Logger
Returns:
true if messages will be logged at the severe level, otherwise false.

isLoggableWarning

public boolean isLoggableWarning()
Description copied from interface: Logger
Tells whether messages at the warning level will be logged.

Specified by:
isLoggableWarning in interface Logger
Returns:
true if messages will be logged at the warning level, otherwise false.


Copyright © 2008 Iparelan Solutions, LLC. All rights reserved.