| java.lang.Object de.fho.jump.pirol.utilities.debugOutput.GenericDebugLogger
GenericDebugLogger | final public class GenericDebugLogger (Code) | | 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.
author: Ole Rahn, Stefan Ostermann author:
author: FH Osnabrück - University of Applied Sciences Osnabrück, author: Project: PIROL (2005), author: Subproject: Daten- und Wissensmanagement version: $Rev: 856 $ See Also: de.fhOsnabrueck.jump.pirol.PirolPlugInSettings See Also: PersonalLogger |
Method Summary | |
final protected String | getCallerString(Throwable t) | final static GenericDebugLogger | getInstance() | final public int | getLogLevel() | final public String | getPropertiesFile() | final public boolean | isPrintFileAndLine() | final public boolean | isPrintNewLineFirst() | final public boolean | isPrintTimeStamp() | final protected void | loadProperties() load local configuration file, to check if there are saved directorties for
debugging outputs. | final protected void | printDebug(String user, String message) | final protected void | printError(String user, String message) | final protected void | printMessage(String user, int severity, String message) | final protected void | printMinorError(String user, String message) | final protected void | printSevereError(String user, String message) | final protected void | printWarning(String user, String message) | final public void | setErrorStream(PrintStream err) Set the stream, where messages with a loglevel >= SEVERITY_MINORERROR are put out. | final public void | setLogLevel(int logLevel) | final public void | setOutputStream(PrintStream out) Set the stream, where messages with a loglevel < SEVERITY_MINORERROR are put out. | final protected boolean | showMessagesOfUser(String user) |
KEY_ECLIPSEFRIENDLYOUTPUT | final protected static String KEY_ECLIPSEFRIENDLYOUTPUT(Code) | | |
KEY_LOGLEVEL | final protected static String KEY_LOGLEVEL(Code) | | |
KEY_PRINTFILEANDLINE | final protected static String KEY_PRINTFILEANDLINE(Code) | | |
KEY_PRINTNEWLINEFIRST | final protected static String KEY_PRINTNEWLINEFIRST(Code) | | |
KEY_PRINTSHORTCLASSNAMES | final protected static String KEY_PRINTSHORTCLASSNAMES(Code) | | |
KEY_PRINTTIMESTAMPS | final protected static String KEY_PRINTTIMESTAMPS(Code) | | |
KEY_PRINTUSERNAMES | final protected static String KEY_PRINTUSERNAMES(Code) | | |
KEY_USELOGFILE | final protected static String KEY_USELOGFILE(Code) | | |
SEVERITY_MINORERROR | final public static int SEVERITY_MINORERROR(Code) | | Constant
GenericDebugLogger.logLevel for an error that won't have influence on
the results occured.
|
SEVERITY_SEVEREERROR | final public static int SEVERITY_SEVEREERROR(Code) | | Constant
GenericDebugLogger.logLevel for an error that may invalidate the
current and future results or may crash the VM, etc..
|
eclipseFriendlyOutput | protected boolean eclipseFriendlyOutput(Code) | | format the output string so that eclipse supports jumping into the
correct file and line number when clicking on the output.
|
logLevel | protected int logLevel(Code) | | 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.
|
printFileAndLine | protected boolean printFileAndLine(Code) | | wether or not to print file name and line number in code
|
printNewLineFirst | protected boolean printNewLineFirst(Code) | | print additional line break before output of new messages?
|
printShortClassNames | protected boolean printShortClassNames(Code) | | print short class names instead of class name plus the whole package path?
|
printTimeStamp | protected boolean printTimeStamp(Code) | | wether or not to print time stamps in the messages
|
printUserNames | protected boolean printUserNames(Code) | | print user names with every message?
|
propertiesFile | final protected static String propertiesFile(Code) | | |
severityLevels | final protected static String[] severityLevels(Code) | | |
useLogFile | protected boolean useLogFile(Code) | | use a log file instead of printing messages to the console?
|
getLogLevel | final public int getLogLevel()(Code) | | current log level |
getPropertiesFile | final public String getPropertiesFile()(Code) | | File name of the file where logger configuration is stored |
isPrintFileAndLine | final public boolean isPrintFileAndLine()(Code) | | true or false //TODO specify the return value |
isPrintNewLineFirst | final public boolean isPrintNewLineFirst()(Code) | | true or false //TODO specify the return value |
isPrintTimeStamp | final public boolean isPrintTimeStamp()(Code) | | true or false //TODO specify the return value |
loadProperties | final protected void loadProperties() throws IOException(Code) | | 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 |
printMessage | final protected void printMessage(String user, int severity, String message)(Code) | | |
setErrorStream | final public void setErrorStream(PrintStream err)(Code) | | Set the stream, where messages with a loglevel >= SEVERITY_MINORERROR are put out.
Parameters: err - stream for debugging output |
setLogLevel | final public void setLogLevel(int logLevel)(Code) | | Parameters: logLevel - |
setOutputStream | final public void setOutputStream(PrintStream out)(Code) | | Set the stream, where messages with a loglevel < SEVERITY_MINORERROR are put out.
Parameters: out - stream for debugging output |
showMessagesOfUser | final protected boolean showMessagesOfUser(String user)(Code) | | check if the properties contain information on how to treat messages
from this user
Parameters: user - user id to check true, if Properties contain information on this user that allow posting his/her messages |
|
|