org.sikuli.script
Class Debug

java.lang.Object
  extended by org.sikuli.script.Debug

public class Debug
extends Object

Debug is a utility class that wraps println statements and allows more or less command line output to be turned on.

Change the value of the DEBUG_LEVEL constant using a system property: sikuli.Debug. For example, on the command line, use -Dsikuli.Debug=x, or simply -Dsikuli.Debug to enable it at level 0. The log(level, message, ...) method will print to standard output if the level number is less than or equal to the currently set DEBUG_LEVEL.


Constructor Summary
Debug()
           
 
Method Summary
 long endTiming(String message)
           
static void error(String message, Object... args)
           
static void history(String message, Object... args)
           
static void info(String message, Object... args)
           
static boolean isEnabled()
           
static boolean isEnabled(int level)
           
static void log(int level, String message, Object... args)
           
static void log(int level, String prefix, String message, Object... args)
          Log message if the log level >= level.
static void log(String message, Object... args)
          Logs message at the default log level.
static void profile(String message, Object... args)
           
 void startTiming(String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Debug

public Debug()
Method Detail

log

public static void log(int level,
                       String prefix,
                       String message,
                       Object... args)
Log message if the log level >= level. Uses printf.


log

public static void log(int level,
                       String message,
                       Object... args)

isEnabled

public static boolean isEnabled(int level)
Returns:
true if level is being logged.

isEnabled

public static boolean isEnabled()
Returns:
true if the default level is being logged.

log

public static void log(String message,
                       Object... args)
Logs message at the default log level.


history

public static void history(String message,
                           Object... args)

info

public static void info(String message,
                        Object... args)

error

public static void error(String message,
                         Object... args)

profile

public static void profile(String message,
                           Object... args)

startTiming

public void startTiming(String message)

endTiming

public long endTiming(String message)