edu.ucsb.nceas.morpho.util
Class Log

java.lang.Object
  extended byedu.ucsb.nceas.morpho.util.Log

public class Log
extends java.lang.Object

The Log is a utility class for logging messages to stdout, stderr, a file, or a dialog box. By default you can call just the static method Log.debug() to log messages. If you want to turn debugging off or change the default severity, use Log.getLog() to get the Log instance, and then call setDubug() and setDebugLevel(), respectively.


Method Summary
static void debug(int severity, java.lang.String message)
          Print debugging messages based on severity level, where severity level 1 are the most critical and higher numbers are more trivial messages.
static Log getLog()
          Get the single instance of the Log
static void setDebug(boolean shouldDebug)
          Turn debugging on or off
static void setDebugLevel(int level)
          Set the threshold severity for debugging output
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLog

public static Log getLog()
Get the single instance of the Log

Returns:
a pointer to the single instance of the Log

setDebug

public static void setDebug(boolean shouldDebug)
Turn debugging on or off


setDebugLevel

public static void setDebugLevel(int level)
Set the threshold severity for debugging output


debug

public static void debug(int severity,
                         java.lang.String message)
Print debugging messages based on severity level, where severity level 1 are the most critical and higher numbers are more trivial messages. Messages with severity 1 to 4 will result in an error dialog box for the user to inspect. Those with severity 5-9 result in a warning dialog box for the user to inspect. Those with severity greater than 9 are printed only to standard error. Setting the debugLevel to 0 in the configuration file turns all messages off.

Parameters:
severity - the severity of the debug message
message - the message to log


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.