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.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 Details

    • properties

      protected PropertiesHandler properties
      Deprecated.
    • propertiesFile

      protected static final String propertiesFile
      Deprecated.
      See Also:
    • 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:
    • SEVERITY_DEBUG

      public static final int SEVERITY_DEBUG
      Deprecated.
      Constant logLevel for debugging purposes.
      See Also:
    • SEVERITY_WARNING

      public static final int SEVERITY_WARNING
      Deprecated.
      Constant logLevel for something that might not be good happened.
      See Also:
    • SEVERITY_MINORERROR

      public static final int SEVERITY_MINORERROR
      Deprecated.
      Constant logLevel for an error that won't have influence on the results occured.
      See Also:
    • SEVERITY_ERROR

      public static final int SEVERITY_ERROR
      Deprecated.
      Constant logLevel for an error that may invalidate the current results occured.
      See Also:
    • SEVERITY_SEVEREERROR

      public static final int SEVERITY_SEVEREERROR
      Deprecated.
      Constant logLevel for an error that may invalidate the current and future results or may crash the VM, etc..
      See Also:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • printUserNames

      protected boolean printUserNames
      Deprecated.
      print user names with every message?
    • KEY_PRINTUSERNAMES

      protected static final String KEY_PRINTUSERNAMES
      Deprecated.
      See Also:
    • 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:
  • Method Details

    • loadProperties

      protected final void loadProperties() throws IOException
      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

      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.
    • getCallerString

      protected final String getCallerString(Throwable t)
      Deprecated.
    • printDebug

      protected final void printDebug(String user, String message)
      Deprecated.
    • printWarning

      protected final void printWarning(String user, String message)
      Deprecated.
    • printMinorError

      protected final void printMinorError(String user, String message)
      Deprecated.
    • printError

      protected final void printError(String user, String message)
      Deprecated.
    • printSevereError

      protected final void printSevereError(String user, 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 invalid input: '<' 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