|
The Meta-Environment API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbus.logging.LoggerFactory
public class LoggerFactory
Factory for creating a logger. Follows singleton design pattern.
Nested Class Summary | |
---|---|
private static class |
LoggerFactory.LoggerKeeper
Instance keeper; for ensuring thread-safe, lazy intialization of the logger. |
Field Summary | |
---|---|
private static java.lang.String |
filter
|
private static int |
nrOfRegisteredNames
|
private static java.util.Set<java.lang.String> |
registeredNames
|
private static java.util.Set<java.lang.String> |
registeredTypes
|
Constructor Summary | |
---|---|
private |
LoggerFactory()
Default constructor. |
Method Summary | |
---|---|
static void |
deregisterName(java.lang.String name)
Deregisters the given string as a name, so the messages that are associated with it will no longer be logged. |
static void |
deregisterType(java.lang.String type)
Deregisters the given string as log type identifier, so the messages that are associated with it will no longer be logged. |
static ILogger |
getLogger()
Returns a reference to the instantiated logger. |
static void |
log(java.lang.String message,
int loglevel,
java.lang.String type)
Convenience method for logging. |
static void |
log(java.lang.String processName,
java.lang.String message,
java.lang.String type)
Convenience method for debugging. |
static void |
log(java.lang.String message,
java.lang.Throwable throwable,
int loglevel,
java.lang.String type)
Convenience method for logging. |
static void |
registerName(java.lang.String name)
Registers the given string as a name. |
static void |
registerType(java.lang.String type)
Registers the given string as a log type identifier. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.Set<java.lang.String> registeredTypes
private static final java.util.Set<java.lang.String> registeredNames
private static int nrOfRegisteredNames
private static java.lang.String filter
Constructor Detail |
---|
private LoggerFactory()
Method Detail |
---|
public static void registerType(java.lang.String type)
type
- The log type identifier.public static void deregisterType(java.lang.String type)
type
- The log type identifier.public static void registerName(java.lang.String name)
name
- The name of interest.public static void deregisterName(java.lang.String name)
name
- The name of interest.public static void log(java.lang.String processName, java.lang.String message, java.lang.String type)
processName
- TODOmessage
- The message that needs to be logged.type
- The type of the message.public static void log(java.lang.String message, int loglevel, java.lang.String type)
message
- The message that needs to be logged.loglevel
- The log level of the message.public static void log(java.lang.String message, java.lang.Throwable throwable, int loglevel, java.lang.String type)
message
- The message that needs to be logged.throwable
- The stacktrace associated with the message.loglevel
- The log level of the message.public static ILogger getLogger()
|
The Meta-Environment API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |