org.openjena.atlas.logging
Class Log

java.lang.Object
  extended by org.openjena.atlas.logging.Log

public class Log
extends Object


Method Summary
static void debug(Class<?> cls, String msg)
           
static void debug(Class<?> cls, String msg, Throwable th)
           
static void debug(org.slf4j.Logger log, String fmt, Object... args)
           
static void debug(Object caller, String msg)
           
static void debug(Object caller, String msg, Throwable th)
           
static void debug(String caller, String msg)
           
static void disable(Class<?> logger)
          Turn on a logger (all levels).
static void disable(String logger)
          Turn on a logger (all levels).
static void enable(Class<?> logger)
          Turn on a logger (all levels).
static void enable(String logger)
          Turn on a logger (all levels).
static void enable(String logger, String level)
           
static void error(org.slf4j.Logger log, String fmt, Object... args)
           
static void fatal(Class<?> cls, String msg)
           
static void fatal(Class<?> cls, String msg, Throwable th)
           
static void fatal(Object caller, String msg)
           
static void fatal(Object caller, String msg, Throwable th)
           
static void fatal(String caller, String msg)
           
static void info(Class<?> cls, String msg)
           
static void info(Class<?> cls, String msg, Throwable th)
           
static void info(org.slf4j.Logger log, String fmt, Object... args)
           
static void info(Object caller, String msg)
           
static void info(Object caller, String msg, Throwable th)
           
static void info(String caller, String msg)
           
static org.slf4j.Logger log(Class<?> cls)
           
static org.slf4j.Logger log(String loggerName)
           
static void logLevel(String logger, org.apache.log4j.Level level1, Level level2)
           
static void resetLogging(String config)
           
static void setCmdLogging()
          Set logging, suitable for a command line application.
static void setCmdLogging(String defaultConfig)
          Set logging, suitable for a command line application.
static void setInfo(Class<?> logger)
          Set to infomation level.
static void setInfo(String logger)
          Set to infomation level.
static void setJavaLogging()
           
static void setJavaLogging(String file)
           
static void setJavaLoggingDft()
           
static boolean setLog4j()
          Set logging Check for -Dlog4j.configuration. Looks for log4j.properties file in current directory. Return true if we think Log4J is not initialized.
static void setLog4j(String filename)
          Set log4j properties (XML or properties file)
static void setWarn(Class<?> logger)
          Set to warning level.
static void setWarn(String logger)
          Set to warning level.
static void trace(org.slf4j.Logger log, String fmt, Object... args)
           
static void warn(Class<?> cls, String msg)
           
static void warn(Class<?> cls, String msg, Throwable th)
           
static void warn(org.slf4j.Logger log, String fmt, Object... args)
           
static void warn(Object caller, String msg)
           
static void warn(Object caller, String msg, Throwable th)
           
static void warn(String caller, String msg)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

info

public static void info(org.slf4j.Logger log,
                        String fmt,
                        Object... args)

debug

public static void debug(org.slf4j.Logger log,
                         String fmt,
                         Object... args)

trace

public static void trace(org.slf4j.Logger log,
                         String fmt,
                         Object... args)

warn

public static void warn(org.slf4j.Logger log,
                        String fmt,
                        Object... args)

error

public static void error(org.slf4j.Logger log,
                         String fmt,
                         Object... args)

info

public static void info(String caller,
                        String msg)

info

public static void info(Object caller,
                        String msg)

info

public static void info(Class<?> cls,
                        String msg)

info

public static void info(Object caller,
                        String msg,
                        Throwable th)

info

public static void info(Class<?> cls,
                        String msg,
                        Throwable th)

debug

public static void debug(String caller,
                         String msg)

debug

public static void debug(Object caller,
                         String msg)

debug

public static void debug(Class<?> cls,
                         String msg)

debug

public static void debug(Object caller,
                         String msg,
                         Throwable th)

debug

public static void debug(Class<?> cls,
                         String msg,
                         Throwable th)

warn

public static void warn(String caller,
                        String msg)

warn

public static void warn(Object caller,
                        String msg)

warn

public static void warn(Class<?> cls,
                        String msg)

warn

public static void warn(Object caller,
                        String msg,
                        Throwable th)

warn

public static void warn(Class<?> cls,
                        String msg,
                        Throwable th)

fatal

public static void fatal(Object caller,
                         String msg)

fatal

public static void fatal(Class<?> cls,
                         String msg)

fatal

public static void fatal(Object caller,
                         String msg,
                         Throwable th)

fatal

public static void fatal(Class<?> cls,
                         String msg,
                         Throwable th)

fatal

public static void fatal(String caller,
                         String msg)

log

public static org.slf4j.Logger log(Class<?> cls)

log

public static org.slf4j.Logger log(String loggerName)

enable

public static void enable(String logger)
Turn on a logger (all levels). Works for Log4j and Java logging as the logging provider to Apache common logging or slf4j.


enable

public static void enable(String logger,
                          String level)

logLevel

public static void logLevel(String logger,
                            org.apache.log4j.Level level1,
                            Level level2)

enable

public static void enable(Class<?> logger)
Turn on a logger (all levels). Works for Log4j and Java logging as the logging provider to Apache common logging or slf4j.


disable

public static void disable(String logger)
Turn on a logger (all levels). Works for Log4j and Java logging as the logging provider to Apache common logging or slf4j.


disable

public static void disable(Class<?> logger)
Turn on a logger (all levels). Works for Log4j and Java logging as the logging provider to Apache common logging or slf4j.


setWarn

public static void setWarn(String logger)
Set to warning level. Works for Log4j and Java logging as the logging provider to Apache common logging or slf4j.


setWarn

public static void setWarn(Class<?> logger)
Set to warning level. Works for Log4j and Java logging as the logging provider to Apache common logging or slf4j.


setInfo

public static void setInfo(String logger)
Set to infomation level. Works for Log4j and Java logging as the logging provider to Apache common logging or slf4j.


setInfo

public static void setInfo(Class<?> logger)
Set to infomation level. Works for Log4j and Java logging as the logging provider to Apache common logging or slf4j.


setLog4j

public static boolean setLog4j()
Set logging
  1. Check for -Dlog4j.configuration.
  2. Looks for log4j.properties file in current directory.
Return true if we think Log4J is not initialized.


setLog4j

public static void setLog4j(String filename)
Set log4j properties (XML or properties file)


setCmdLogging

public static void setCmdLogging()
Set logging, suitable for a command line application.
  1. Check for -Dlog4j.configuration.
  2. Looks for log4j.properties file in current directory.
  3. Sets log4j using an internal configuration.


setCmdLogging

public static void setCmdLogging(String defaultConfig)
Set logging, suitable for a command line application.
  1. Check for -Dlog4j.configuration.
  2. Looks for log4j.properties file in current directory.
  3. Sets log4j using the provided default configuration.
T


resetLogging

public static void resetLogging(String config)

setJavaLogging

public static void setJavaLogging()

setJavaLogging

public static void setJavaLogging(String file)

setJavaLoggingDft

public static void setJavaLoggingDft()


Licenced under the Apache License, Version 2.0