Class GenericDebugLogger
- java.lang.Object
-
- de.fho.jump.pirol.utilities.debugOutput.GenericDebugLogger
-
@Deprecated public final class GenericDebugLogger extends Object
Deprecated.see com.vividsolutions.jump.workbench.LoggerClass to handle debugging outputs. It is a singleton and keeps track of local debug settings and personal log levels. Configuration changes should not be done at runtime, but in the properties file ("debugging.properties") in the "[HOME]/.OpenJump_PIROL/config" directory. This file will be created when the logger is used the first time and filled with default values. For information on these values, please see commenting in the java source code.- Version:
- $Rev$
- Author:
- Ole Rahn, Stefan Ostermann
FH Osnabrück - University of Applied Sciences Osnabrück,
Project: PIROL (2005),
Subproject: Daten- und Wissensmanagement - See Also:
PirolPlugInSettings,TODO replace GenericDebugLogger usage by com.vividsolutions.jump.workbench.Logger
-
-
Field Summary
Fields Modifier and Type Field Description protected booleaneclipseFriendlyOutputDeprecated.format the output string so that eclipse supports jumping into the correct file and line number when clicking on the output.protected static StringKEY_ECLIPSEFRIENDLYOUTPUTDeprecated.protected static StringKEY_LOGLEVELDeprecated.protected static StringKEY_PRINTFILEANDLINEDeprecated.protected static StringKEY_PRINTNEWLINEFIRSTDeprecated.protected static StringKEY_PRINTSHORTCLASSNAMESDeprecated.protected static StringKEY_PRINTTIMESTAMPSDeprecated.protected static StringKEY_PRINTUSERNAMESDeprecated.protected static StringKEY_USELOGFILEDeprecated.protected FilelogFileDeprecated.protected intlogLevelDeprecated.The logLevel specifies which kinds of messages will be put out.protected booleanprintFileAndLineDeprecated.wether or not to print file name and line number in codeprotected booleanprintNewLineFirstDeprecated.print additional line break before output of new messages?protected booleanprintShortClassNamesDeprecated.print short class names instead of class name plus the whole package path?protected booleanprintTimeStampDeprecated.wether or not to print time stamps in the messagesprotected booleanprintUserNamesDeprecated.print user names with every message?protected PropertiesHandlerpropertiesDeprecated.protected static StringpropertiesFileDeprecated.static intSEVERITY_DEBUGDeprecated.ConstantlogLevelfor debugging purposes.static intSEVERITY_ERRORDeprecated.ConstantlogLevelfor an error that may invalidate the current results occured.static intSEVERITY_MINORERRORDeprecated.ConstantlogLevelfor an error that won't have influence on the results occured.static intSEVERITY_SEVEREERRORDeprecated.ConstantlogLevelfor an error that may invalidate the current and future results or may crash the VM, etc..static intSEVERITY_WARNINGDeprecated.ConstantlogLevelfor something that might not be good happened.protected static String[]severityLevelsDeprecated.protected PrintStreamstdErrDeprecated.protected PrintStreamstdOutDeprecated.protected booleanuseLogFileDeprecated.use a log file instead of printing messages to the console?
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected StringgetCallerString(Throwable t)Deprecated.intgetLogLevel()Deprecated.StringgetPropertiesFile()Deprecated.booleanisPrintFileAndLine()Deprecated.booleanisPrintNewLineFirst()Deprecated.booleanisPrintTimeStamp()Deprecated.protected voidloadProperties()Deprecated.load local configuration file, to check if there are saved directorties for debugging outputs.protected voidprintDebug(String user, String message)Deprecated.protected voidprintError(String user, String message)Deprecated.protected voidprintMessage(String user, int severity, String message)Deprecated.protected voidprintMinorError(String user, String message)Deprecated.protected voidprintSevereError(String user, String message)Deprecated.protected voidprintWarning(String user, String message)Deprecated.voidsetErrorStream(PrintStream err)Deprecated.Set the stream, where messages with a loglevel >= SEVERITY_MINORERROR are put out.voidsetLogLevel(int logLevel)Deprecated.voidsetOutputStream(PrintStream out)Deprecated.Set the stream, where messages with a loglevel < SEVERITY_MINORERROR are put out.protected booleanshowMessagesOfUser(String user)Deprecated.check if the properties contain information on how to treat messages from this user
-
-
-
Field Detail
-
properties
protected PropertiesHandler properties
Deprecated.
-
propertiesFile
protected static final String propertiesFile
Deprecated.- See Also:
- Constant Field Values
-
logLevel
protected int logLevel
Deprecated.The logLevel specifies which kinds of messages will be put out. A message will be put out, if its severity is greater or equal to the log level (or if the user's log messages are enabled)logLevel severity sheme: 0 - debug - just an output for debugging purposes 1 - warning - something that might not be good happened 2 - minor error - an error that won't have influence on the results occured 3 - error - an error that may invalidate the current results occured 4 - severe error - an error that may invalidate the current and future results or may crash the VM, etc.
-
KEY_LOGLEVEL
protected static final String KEY_LOGLEVEL
Deprecated.- See Also:
- Constant Field Values
-
SEVERITY_DEBUG
public static final int SEVERITY_DEBUG
Deprecated.ConstantlogLevelfor debugging purposes.- See Also:
- Constant Field Values
-
SEVERITY_WARNING
public static final int SEVERITY_WARNING
Deprecated.ConstantlogLevelfor something that might not be good happened.- See Also:
- Constant Field Values
-
SEVERITY_MINORERROR
public static final int SEVERITY_MINORERROR
Deprecated.ConstantlogLevelfor an error that won't have influence on the results occured.- See Also:
- Constant Field Values
-
SEVERITY_ERROR
public static final int SEVERITY_ERROR
Deprecated.ConstantlogLevelfor an error that may invalidate the current results occured.- See Also:
- Constant Field Values
-
SEVERITY_SEVEREERROR
public static final int SEVERITY_SEVEREERROR
Deprecated.ConstantlogLevelfor an error that may invalidate the current and future results or may crash the VM, etc..- See Also:
- Constant Field Values
-
severityLevels
protected static final String[] severityLevels
Deprecated.
-
eclipseFriendlyOutput
protected boolean eclipseFriendlyOutput
Deprecated.format the output string so that eclipse supports jumping into the correct file and line number when clicking on the output.
-
KEY_ECLIPSEFRIENDLYOUTPUT
protected static final String KEY_ECLIPSEFRIENDLYOUTPUT
Deprecated.- See Also:
- Constant Field Values
-
printTimeStamp
protected boolean printTimeStamp
Deprecated.wether or not to print time stamps in the messages
-
KEY_PRINTTIMESTAMPS
protected static final String KEY_PRINTTIMESTAMPS
Deprecated.- See Also:
- Constant Field Values
-
printFileAndLine
protected boolean printFileAndLine
Deprecated.wether or not to print file name and line number in code
-
KEY_PRINTFILEANDLINE
protected static final String KEY_PRINTFILEANDLINE
Deprecated.- See Also:
- Constant Field Values
-
printNewLineFirst
protected boolean printNewLineFirst
Deprecated.print additional line break before output of new messages?
-
KEY_PRINTNEWLINEFIRST
protected static final String KEY_PRINTNEWLINEFIRST
Deprecated.- See Also:
- Constant Field Values
-
printShortClassNames
protected boolean printShortClassNames
Deprecated.print short class names instead of class name plus the whole package path?
-
KEY_PRINTSHORTCLASSNAMES
protected static final String KEY_PRINTSHORTCLASSNAMES
Deprecated.- See Also:
- Constant Field Values
-
printUserNames
protected boolean printUserNames
Deprecated.print user names with every message?
-
KEY_PRINTUSERNAMES
protected static final String KEY_PRINTUSERNAMES
Deprecated.- See Also:
- Constant Field Values
-
stdOut
protected PrintStream stdOut
Deprecated.
-
stdErr
protected PrintStream stdErr
Deprecated.
-
logFile
protected File logFile
Deprecated.
-
useLogFile
protected boolean useLogFile
Deprecated.use a log file instead of printing messages to the console?
-
KEY_USELOGFILE
protected static final String KEY_USELOGFILE
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadProperties
protected final void loadProperties() throws IOExceptionDeprecated.load local configuration file, to check if there are saved directorties for debugging outputs.- Throws:
IOException- if the file with the given file name could not be accessed
-
showMessagesOfUser
protected final boolean showMessagesOfUser(String user)
Deprecated.check if the properties contain information on how to treat messages from this user- Parameters:
user- user id to check- Returns:
- true, if Properties contain information on this user that allow posting his/her messages
-
printMessage
protected final void printMessage(String user, int severity, String message)
Deprecated.
-
getLogLevel
public final int getLogLevel()
Deprecated.- Returns:
- current log level
-
setLogLevel
public final void setLogLevel(int logLevel)
Deprecated.- Parameters:
logLevel- the minimum log level to keep
-
isPrintFileAndLine
public final boolean isPrintFileAndLine()
Deprecated.- Returns:
- true or false //TODO specify the return value
-
isPrintNewLineFirst
public final boolean isPrintNewLineFirst()
Deprecated.- Returns:
- true or false //TODO specify the return value
-
isPrintTimeStamp
public final boolean isPrintTimeStamp()
Deprecated.- Returns:
- true or false //TODO specify the return value
-
getPropertiesFile
public final String getPropertiesFile()
Deprecated.- Returns:
- File name of the file where logger configuration is stored
-
setOutputStream
public final void setOutputStream(PrintStream out)
Deprecated.Set the stream, where messages with a loglevel < SEVERITY_MINORERROR are put out.- Parameters:
out- stream for debugging output
-
setErrorStream
public final void setErrorStream(PrintStream err)
Deprecated.Set the stream, where messages with a loglevel >= SEVERITY_MINORERROR are put out.- Parameters:
err- stream for debugging output
-
-