com.iparelan.util.logging
Class LoggingFactory

java.lang.Object
  extended by com.iparelan.util.logging.LoggingFactory

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

A factory for creating logging component objects.

Version:
July 2008
Author:
Greg Mattes
See Also:
META-INF/services/com.iparelan.util.logging.FactoryInterface

Nested Class Summary
private static class LoggingFactory.FactoryHolder
           
 
Constructor Summary
private LoggingFactory()
          Not instantiable.
 
Method Summary
static Logger getLogger(String name)
          Produces a new Logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingFactory

private LoggingFactory()
Not instantiable.

Method Detail

getLogger

@Nullable
public static Logger getLogger(@Nullable
                                        String name)
Produces a new Logger.

Parameters:
name - The name of the logger to get. May not be null.
Returns:
A new Logger or null if the logging service is being loaded. null is produced at most once.
Throws:
ServiceConfigurationException - Iff no FactoryInterface can be instanciated.
To Do:
  • This method is designed to produce null only in the case that a logging service is not yet loaded. Is there some way to reliably detect such a situation programmatically? Furthermore, can/should a check be put into place to ensure that null is produced at most once, e.g with an AtomicBoolean?


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