jInfer

cz.cuni.mff.ksi.jinfer.base.utils
Class LogLevels

java.lang.Object
  extended by cz.cuni.mff.ksi.jinfer.base.utils.LogLevels

public final class LogLevels
extends Object

Helper class providing static methods for easier integration of log4j logging.


Method Summary
static String getConsoleThreshold()
          Get the log level that is written to console output which is currently set.
static ComboBoxModel getDefaultModel()
          Creates a combo box model with all allowed log levels sorted by severity.
static String getFileThreshold()
          Get the log level that is written to file output which is currently set.
static List<String> getList()
           
static String getRootLogLevel()
          Get the log level which is currently set for all outputs.
static void setConsoleThreshold(String level)
          Set the log level for messages written to console output.
static void setFileThreshold(String level)
          Set the log level for messages written to file output.
static void setRootLogLevel(String level)
          Set a new log level for all outputs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getList

public static List<String> getList()

getDefaultModel

public static ComboBoxModel getDefaultModel()
Creates a combo box model with all allowed log levels sorted by severity. Level OFF is at the top, followed by most severe FATAL. There are 8 levels taken from log4j.Level.

Returns:
New DefaultComboBoxModel with all 8 levels supported by log4j.
See Also:
DefaultComboBoxModel, Level

getRootLogLevel

public static String getRootLogLevel()
Get the log level which is currently set for all outputs. Messages with priority semantically lower than this level will be discarded. This setting also defines the default log level for every module.

Returns:
Current ROOT log level.

setRootLogLevel

public static void setRootLogLevel(String level)
Set a new log level for all outputs. Messages with priority semantically lower than this level will be discarded. This setting also defines the default log level for every module.

Parameters:
level - New ROOT and default log level.

getFileThreshold

public static String getFileThreshold()
Get the log level that is written to file output which is currently set.

Returns:
Log level for file output.

getConsoleThreshold

public static String getConsoleThreshold()
Get the log level that is written to console output which is currently set.

Returns:
Log level for console output.

setFileThreshold

public static void setFileThreshold(String level)
Set the log level for messages written to file output.

Parameters:
level - New file log level.

setConsoleThreshold

public static void setConsoleThreshold(String level)
Set the log level for messages written to console output.

Parameters:
level - New console log level.

jInfer

Generated on Fri Dec 9 00:01:25 CET 2011