public class EASyLoggerFactory
extends java.lang.Object
containing package.| Modifier and Type | Class and Description |
|---|---|
class |
EASyLoggerFactory.EASyLogger
Logger instance for logging in plug-ins of the EASy-Producer.
|
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG
This constant value should be set to:
false: For a release.
|
static EASyLoggerFactory |
INSTANCE |
private LoggingLevel |
level |
private static java.lang.String |
LOG_FILE_PATH
Specification to log into a specified file instead of logging into the console.
|
private ILogger |
logger |
private static java.lang.String |
LOGGING_LEVEL_PROPERTY |
| Modifier | Constructor and Description |
|---|---|
private |
EASyLoggerFactory()
Singleton constructor for Logger.
|
| Modifier and Type | Method and Description |
|---|---|
private static LoggingLevel |
determineLevel(LoggingLevel defaultLevel)
Checks whether a property was passed to the JVM for specifying a
LoggingLevel. |
EASyLoggerFactory.EASyLogger |
getLogger(java.lang.Class<?> clazz,
java.lang.String bundleName)
Returns a logger instance for logging informations, warnings, and errors in a concrete class.
|
LoggingLevel |
getLoggingLevel()
Returns the
LoggingLevel that is used by the logger. |
ILogger |
setLogger(ILogger logger)
Sets an
ILogger. |
void |
setLoggingLevel(LoggingLevel loggingLevel)
Sets an
LoggingLevel. |
public static final EASyLoggerFactory INSTANCE
public static final boolean DEBUG
private static final java.lang.String LOGGING_LEVEL_PROPERTY
private static final java.lang.String LOG_FILE_PATH
private ILogger logger
private LoggingLevel level
private static LoggingLevel determineLevel(LoggingLevel defaultLevel)
LoggingLevel.
This method is part of the EASyLoggerFactory() (constructor).defaultLevel - The default LoggingLevel which should be used, if no logging property
was passed to the Java VM.LoggingLevel or LoggingLevel.WARN
if no one was specified via a property.public EASyLoggerFactory.EASyLogger getLogger(java.lang.Class<?> clazz, java.lang.String bundleName)
clazz - The class to log.bundleName - The name of the plug-in containing the logged class (can be null).public ILogger setLogger(ILogger logger)
ILogger. This ILogger will be used inside the getLogger(Class, String)
method for creating concrete logger instances. Also all already created loggers will be updated automatically.logger - The new ILogger which shall be used to log all info, warnings, and errors.
Must not be null.public LoggingLevel getLoggingLevel()
LoggingLevel that is used by the logger.public void setLoggingLevel(LoggingLevel loggingLevel)
LoggingLevel.loggingLevel - The new LoggingLevel which shall be used to log.Copyright © 2009 - 2018 SSE. All Rights Reserved.