org.csstudio.logging
Class Preferences

java.lang.Object
  extended by org.csstudio.logging.Preferences

public class Preferences
extends java.lang.Object

Helper to read preferences

Author:
Kay Kasemir

Field Summary
static java.lang.String CONSOLE_LEVEL
           
static java.lang.String DETAIL
           
static java.lang.String FILE_BYTES
           
static java.lang.String FILE_COUNT
           
static java.lang.String FILE_LEVEL
           
static java.lang.String FILE_PATTERN
           
static java.lang.String JMS_LEVEL
           
static java.lang.String JMS_TOPIC
           
static java.lang.String JMS_URL
           
 
Constructor Summary
Preferences()
           
 
Method Summary
static java.util.logging.Level getConsoleLevel()
           
static LogFormatDetail getDetail()
           
static int getFileBytes()
           
static int getFileCount()
           
static java.util.logging.Level getFileLevel()
           
static java.lang.String getFilePattern()
           
static java.util.logging.Level getJMSLevel()
           
static java.lang.String getJMSTopic()
           
static java.lang.String getJMSURL()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DETAIL

public static final java.lang.String DETAIL
See Also:
Constant Field Values

CONSOLE_LEVEL

public static final java.lang.String CONSOLE_LEVEL
See Also:
Constant Field Values

FILE_LEVEL

public static final java.lang.String FILE_LEVEL
See Also:
Constant Field Values

FILE_PATTERN

public static final java.lang.String FILE_PATTERN
See Also:
Constant Field Values

FILE_BYTES

public static final java.lang.String FILE_BYTES
See Also:
Constant Field Values

FILE_COUNT

public static final java.lang.String FILE_COUNT
See Also:
Constant Field Values

JMS_LEVEL

public static final java.lang.String JMS_LEVEL
See Also:
Constant Field Values

JMS_URL

public static final java.lang.String JMS_URL
See Also:
Constant Field Values

JMS_TOPIC

public static final java.lang.String JMS_TOPIC
See Also:
Constant Field Values
Constructor Detail

Preferences

public Preferences()
Method Detail

getDetail

public static LogFormatDetail getDetail()
                                 throws java.lang.Exception
Returns:
LogFormatDetail from preferences or a default
Throws:
java.lang.Exception - when value cannot be parsed

getConsoleLevel

public static java.util.logging.Level getConsoleLevel()
                                               throws java.lang.Exception
Returns:
Level for root/console logger from preferences or a default
Throws:
java.lang.Exception - when value cannot be parsed

getFileLevel

public static java.util.logging.Level getFileLevel()
                                            throws java.lang.Exception
Returns:
Level for file logger from preferences or a default
Throws:
java.lang.Exception - when value cannot be parsed

getFilePattern

public static java.lang.String getFilePattern()
                                       throws java.lang.Exception
Returns:
Filename path and pattern for file logger from preferences or a default
Throws:
java.lang.Exception

getFileBytes

public static int getFileBytes()
                        throws java.lang.Exception
Returns:
Maximum number of bytes in file before rotation to next file
Throws:
java.lang.Exception

getFileCount

public static int getFileCount()
                        throws java.lang.Exception
Returns:
Maximum number of files in rotation
Throws:
java.lang.Exception

getJMSLevel

public static java.util.logging.Level getJMSLevel()
                                           throws java.lang.Exception
Returns:
Level for JMS logger from preferences or a default
Throws:
java.lang.Exception - when value cannot be parsed

getJMSURL

public static java.lang.String getJMSURL()
                                  throws java.lang.Exception
Returns:
JMS URL from preferences or a default
Throws:
java.lang.Exception

getJMSTopic

public static java.lang.String getJMSTopic()
                                    throws java.lang.Exception
Returns:
JMS Topic from preferences or a default
Throws:
java.lang.Exception