org.apache.jena.atlas.logging
Class LogCtl

java.lang.Object
  extended by org.apache.jena.atlas.logging.LogCtl

public class LogCtl
extends Object

Setup and control of logging - needs access to log4j binaries


Constructor Summary
LogCtl()
           
 
Method Summary
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(org.slf4j.Logger logger)
          Turn on a logger (all levels).
static void enable(String logger)
           
static void logLevel(String logger, org.apache.log4j.Level level1, Level level2)
           
static void resetLogging(String config)
           
static void set(Class<?> logger, String level)
          Turn on a logger (specific level levels)
static void set(org.slf4j.Logger logger, String level)
           
static void set(String logger, String level)
           
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 setError(Class<?> logger)
          Set to error level.
static void setError(String logger)
          Set to error level.
static void setInfo(Class<?> logger)
          Set to info level.
static void setInfo(String logger)
          Set to info 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogCtl

public LogCtl()
Method Detail

enable

public static void enable(org.slf4j.Logger 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)

set

public static void set(org.slf4j.Logger logger,
                       String level)

set

public static void set(Class<?> logger,
                       String level)
Turn on a logger (specific level levels)


set

public static void set(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.


setInfo

public static void setInfo(String logger)
Set to info 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 info level. 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.


setError

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


setError

public static void setError(Class<?> logger)
Set to error 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