public class LogConfiguration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DISABLE_LOGGING
The 'disable logging' property key.
|
static java.lang.String |
DISABLE_LOGGING_DEFAULT
The default 'disable logging' property value.
|
static java.lang.String |
LOGLEVEL
The 'log level' property key.
|
static java.lang.String |
LOGLEVEL_DEFAULT
The default 'log level' property value.
|
static java.lang.String |
LOGTARGET
The 'log target' property key.
|
static java.lang.String |
LOGTARGET_DEFAULT
The default 'log target' property value.
|
Modifier | Constructor and Description |
---|---|
private |
LogConfiguration()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getLogLevel()
Returns the log level.
|
static java.lang.String |
getLogTarget()
Returns the current log target.
|
static boolean |
isDisableLogging()
Returns
true if logging is disabled, and false otherwise. |
static void |
setDisableLogging(boolean disableLogging)
Sets the flag that disables logging.
|
static void |
setLogLevel(java.lang.String level)
Sets the log level, which is read from the global report configuration at
the point that the classloader loads the
Log class. |
static void |
setLogTarget(java.lang.String logTarget)
Sets the log target.
|
public static final java.lang.String DISABLE_LOGGING_DEFAULT
public static final java.lang.String LOGLEVEL
public static final java.lang.String LOGLEVEL_DEFAULT
public static final java.lang.String LOGTARGET
public static final java.lang.String LOGTARGET_DEFAULT
public static final java.lang.String DISABLE_LOGGING
public static java.lang.String getLogTarget()
public static void setLogTarget(java.lang.String logTarget)
logTarget
- the new log target.public static java.lang.String getLogLevel()
public static void setLogLevel(java.lang.String level)
Log
class.
Valid log levels are:
"Error"
- error messages;"Warn"
- warning messages;"Info"
- information messages;"Debug"
- debug messages;Log
class has been
loaded will have no effect.setDisableLogging(boolean)
method.level
- the new log level.public static boolean isDisableLogging()
true
if logging is disabled, and false
otherwise.public static void setDisableLogging(boolean disableLogging)
To switch off logging globally, you can use the following code:
ReportConfiguration.getGlobalConfig().setDisableLogging(true);
disableLogging
- the flag.