Class GenericDebugLogger
java.lang.Object
de.fho.jump.pirol.utilities.debugOutput.GenericDebugLogger
Deprecated.
see com.vividsolutions.jump.workbench.Logger
Class 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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanDeprecated.format the output string so that eclipse supports jumping into the correct file and line number when clicking on the output.protected static final StringDeprecated.protected static final StringDeprecated.protected static final StringDeprecated.protected static final StringDeprecated.protected static final StringDeprecated.protected static final StringDeprecated.protected static final StringDeprecated.protected static final StringDeprecated.protected FileDeprecated.protected intDeprecated.The logLevel specifies which kinds of messages will be put out.protected booleanDeprecated.wether or not to print file name and line number in codeprotected booleanDeprecated.print additional line break before output of new messages?protected booleanDeprecated.print short class names instead of class name plus the whole package path?protected booleanDeprecated.wether or not to print time stamps in the messagesprotected booleanDeprecated.print user names with every message?protected PropertiesHandlerDeprecated.protected static final StringDeprecated.static final intDeprecated.ConstantlogLevelfor debugging purposes.static final intDeprecated.ConstantlogLevelfor an error that may invalidate the current results occured.static final intDeprecated.ConstantlogLevelfor an error that won't have influence on the results occured.static final intDeprecated.ConstantlogLevelfor an error that may invalidate the current and future results or may crash the VM, etc..static final intDeprecated.ConstantlogLevelfor something that might not be good happened.protected static final String[]Deprecated.protected PrintStreamDeprecated.protected PrintStreamDeprecated.protected booleanDeprecated.use a log file instead of printing messages to the console? -
Method Summary
Modifier and TypeMethodDescriptionprotected final StringDeprecated.final intDeprecated.final StringDeprecated.final booleanDeprecated.final booleanDeprecated.final booleanDeprecated.protected final voidDeprecated.load local configuration file, to check if there are saved directorties for debugging outputs.protected final voidprintDebug(String user, String message) Deprecated.protected final voidprintError(String user, String message) Deprecated.protected final voidprintMessage(String user, int severity, String message) Deprecated.protected final voidprintMinorError(String user, String message) Deprecated.protected final voidprintSevereError(String user, String message) Deprecated.protected final voidprintWarning(String user, String message) Deprecated.final voidDeprecated.Set the stream, where messages with a loglevel >= SEVERITY_MINORERROR are put out.final voidsetLogLevel(int logLevel) Deprecated.final voidDeprecated.Set the stream, where messages with a loglevel invalid input: '<' SEVERITY_MINORERROR are put out.protected final booleanshowMessagesOfUser(String user) Deprecated.check if the properties contain information on how to treat messages from this user
-
Field Details
-
properties
Deprecated. -
propertiesFile
-
logLevel
protected int logLevelDeprecated.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
-
SEVERITY_DEBUG
public static final int SEVERITY_DEBUGDeprecated.ConstantlogLevelfor debugging purposes.- See Also:
-
SEVERITY_WARNING
public static final int SEVERITY_WARNINGDeprecated.ConstantlogLevelfor something that might not be good happened.- See Also:
-
SEVERITY_MINORERROR
public static final int SEVERITY_MINORERRORDeprecated.ConstantlogLevelfor an error that won't have influence on the results occured.- See Also:
-
SEVERITY_ERROR
public static final int SEVERITY_ERRORDeprecated.ConstantlogLevelfor an error that may invalidate the current results occured.- See Also:
-
SEVERITY_SEVEREERROR
public static final int SEVERITY_SEVEREERRORDeprecated.ConstantlogLevelfor an error that may invalidate the current and future results or may crash the VM, etc..- See Also:
-
severityLevels
Deprecated. -
eclipseFriendlyOutput
protected boolean eclipseFriendlyOutputDeprecated.format the output string so that eclipse supports jumping into the correct file and line number when clicking on the output. -
KEY_ECLIPSEFRIENDLYOUTPUT
-
printTimeStamp
protected boolean printTimeStampDeprecated.wether or not to print time stamps in the messages -
KEY_PRINTTIMESTAMPS
-
printFileAndLine
protected boolean printFileAndLineDeprecated.wether or not to print file name and line number in code -
KEY_PRINTFILEANDLINE
-
printNewLineFirst
protected boolean printNewLineFirstDeprecated.print additional line break before output of new messages? -
KEY_PRINTNEWLINEFIRST
-
printShortClassNames
protected boolean printShortClassNamesDeprecated.print short class names instead of class name plus the whole package path? -
KEY_PRINTSHORTCLASSNAMES
-
printUserNames
protected boolean printUserNamesDeprecated.print user names with every message? -
KEY_PRINTUSERNAMES
-
stdOut
Deprecated. -
stdErr
Deprecated. -
logFile
Deprecated. -
useLogFile
protected boolean useLogFileDeprecated.use a log file instead of printing messages to the console? -
KEY_USELOGFILE
-
-
Method Details
-
loadProperties
Deprecated.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
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
-
getCallerString
-
printDebug
-
printWarning
-
printMinorError
-
printError
-
printSevereError
-
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
Deprecated.- Returns:
- File name of the file where logger configuration is stored
-
setOutputStream
Deprecated.Set the stream, where messages with a loglevel invalid input: '<' SEVERITY_MINORERROR are put out.- Parameters:
out- stream for debugging output
-
setErrorStream
Deprecated.Set the stream, where messages with a loglevel >= SEVERITY_MINORERROR are put out.- Parameters:
err- stream for debugging output
-