|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LoggerRegistry
Provides access to Loggers instances based on String keys or Class.getName().
This interface is similar to log4j's LogManager.getLogger() and Java Logging API's LogManager and
implementations should function the same (or even wrap the aforementioned classes). One import difference is that
this is an interface and all members are non-static -- that means you have the option of creating multiple LoggerRegistry classes and configuring & sharing them in application specific ways.
This class is called "Registry" instead of "Factory" because the phrase "Factory" has different and incompatible
meanings in existing logging frameworks. (Also "Registry" implies the ability to register Loggers at
runtime, which Logahawk's HashLoggerRegistry and HierarchicalLoggerRegistry allow.)
| Method Summary | |
|---|---|
Logger |
get(Class clazz)
Returns a Logger for the provided Class. |
Logger |
get(String key)
Returns a Logger for the provided String. |
Logger |
getRootLogger()
Returns the root (or default) Logger. |
| Method Detail |
|---|
Logger getRootLogger()
Logger. The default is used when no Logger matches (String) .
Logger get(String key)
Logger for the provided String. If no specific Logger exists for the given String,
the default Logger will be returned.
Logger get(Class clazz)
Logger for the provided Class. If no specific Logger exists for the given
Class, the default Logger will be returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||