jsky.util
Class Logger

java.lang.Object
  extended by jsky.util.Logger

public class Logger
extends Object

Replacement logger that uses the Jarkarta commons logging system. Note this only provides the used parts of the original JSKY Logger class. This replacement is so that we can remove log4j and only use the Java 1.4 logger system (which is used by STARJAVA).

Author:
Peter W. Draper

Constructor Summary
Logger()
           
 
Method Summary
static void debug(Object o, String message)
          Post a debug message to the category for the class of the given object.
static void debug(Object o, String message, Throwable t)
          Post a debug message to the category for the class of the given object.
static void debug(String category, String message)
          Post a debug message to the specified category.
static void debug(String category, String message, Throwable t)
          Post a debug message to the specified category.
static void error(Object o, String message)
          Post an error message to the category for the class of the given object.
static void error(Object o, String message, Throwable t)
          Post an error message to the category for the class of the given object.
static void error(String category, String message)
          Post an error message to the specified category.
static void error(String category, String message, Throwable t)
          Post an error message to the specified category.
static void info(Object o, String message)
          Post an info message to the category for the class of the given object.
static void info(Object o, String message, Throwable t)
          Post an info message to the category for the class of the given object.
static void info(String category, String message)
          Post an info message to the specified category.
static void info(String category, String message, Throwable t)
          Post an info message to the specified category.
static boolean isDebugEnabled(Object o)
          Check if debug logging is enabled.
static boolean isDebugEnabled(String category)
          Check if debug logging is enabled.
static void main(String[] args)
          A test routine.
static void warn(Object o, String message)
          Post a warning message to the category for the class of the given object.
static void warn(Object o, String message, Throwable t)
          Post a warning message to the category for the class of the given object.
static void warn(String category, String message)
          Post a warning message to the specified category.
static void warn(String category, String message, Throwable t)
          Post a warning message to the specified category.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Logger

public Logger()
Method Detail

isDebugEnabled

public static boolean isDebugEnabled(String category)
Check if debug logging is enabled.


isDebugEnabled

public static boolean isDebugEnabled(Object o)
Check if debug logging is enabled.


debug

public static void debug(String category,
                         String message)
Post a debug message to the specified category.


debug

public static void debug(String category,
                         String message,
                         Throwable t)
Post a debug message to the specified category. A Throwable can be passed and a stack trace will be printed.


debug

public static void debug(Object o,
                         String message)
Post a debug message to the category for the class of the given object.


debug

public static void debug(Object o,
                         String message,
                         Throwable t)
Post a debug message to the category for the class of the given object. A Throwable can be passed and a stack trace will be printed.


info

public static void info(String category,
                        String message)
Post an info message to the specified category.


info

public static void info(String category,
                        String message,
                        Throwable t)
Post an info message to the specified category. A Throwable can be passed and a stack trace will be printed.


info

public static void info(Object o,
                        String message)
Post an info message to the category for the class of the given object.


info

public static void info(Object o,
                        String message,
                        Throwable t)
Post an info message to the category for the class of the given object. A Throwable can be passed and a stack trace will be printed.


warn

public static void warn(String category,
                        String message)
Post a warning message to the specified category.


warn

public static void warn(String category,
                        String message,
                        Throwable t)
Post a warning message to the specified category. A Throwable can be passed and a stack trace will be printed.


warn

public static void warn(Object o,
                        String message)
Post a warning message to the category for the class of the given object.


warn

public static void warn(Object o,
                        String message,
                        Throwable t)
Post a warning message to the category for the class of the given object. A Throwable can be passed and a stack trace will be printed.


error

public static void error(String category,
                         String message)
Post an error message to the specified category.


error

public static void error(String category,
                         String message,
                         Throwable t)
Post an error message to the specified category. A Throwable can be passed and a stack trace will be printed.


error

public static void error(Object o,
                         String message)
Post an error message to the category for the class of the given object.


error

public static void error(Object o,
                         String message,
                         Throwable t)
Post an error message to the category for the class of the given object. A Throwable can be passed and a stack trace will be printed.


main

public static void main(String[] args)
A test routine.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.