org.scijava.log
Class AbstractLogService

java.lang.Object
  extended by org.scijava.AbstractContextual
      extended by org.scijava.plugin.AbstractRichPlugin
          extended by org.scijava.service.AbstractService
              extended by org.scijava.log.AbstractLogService
All Implemented Interfaces:
Comparable<Prioritized>, Contextual, Disposable, LogService, HasPluginInfo, RichPlugin, SciJavaPlugin, Prioritized, SciJavaService, Service
Direct Known Subclasses:
StderrLogService

public abstract class AbstractLogService
extends AbstractService
implements LogService

Base implementation of an abstract LogService.

Author:
Johannes Schindelin

Field Summary
 
Fields inherited from interface org.scijava.log.LogService
DEBUG, ERROR, INFO, LOG_LEVEL_PROPERTY, NONE, TRACE, WARN
 
Constructor Summary
AbstractLogService()
           
 
Method Summary
 void debug(Object msg)
           
 void debug(Object msg, Throwable t)
           
 void debug(Throwable t)
           
 void error(Object msg)
           
 void error(Object msg, Throwable t)
           
 void error(Throwable t)
           
 int getLevel()
           
protected  String getPrefix(int level)
           
 void info(Object msg)
           
 void info(Object msg, Throwable t)
           
 void info(Throwable t)
           
 boolean isDebug()
           
 boolean isError()
           
 boolean isInfo()
           
 boolean isTrace()
           
 boolean isWarn()
           
protected  void log(int level, Object msg)
           
protected  void log(int level, Object msg, Throwable t)
           
protected abstract  void log(String msg)
          Displays a message.
protected abstract  void log(Throwable t)
          Displays an exception.
 void setLevel(int level)
           
 void setLevel(String classOrPackageName, int level)
           
 void trace(Object msg)
           
 void trace(Object msg, Throwable t)
           
 void trace(Throwable t)
           
 void warn(Object msg)
           
 void warn(Object msg, Throwable t)
           
 void warn(Throwable t)
           
 
Methods inherited from class org.scijava.service.AbstractService
dispose, getContext, initialize, registerEventHandlers, setContext, toString
 
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
compareTo, getInfo, getPriority, setInfo, setPriority
 
Methods inherited from class org.scijava.AbstractContextual
context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
 
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
 
Methods inherited from interface org.scijava.Prioritized
getPriority, setPriority
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
 
Methods inherited from interface org.scijava.Disposable
dispose
 

Constructor Detail

AbstractLogService

public AbstractLogService()
Method Detail

log

protected abstract void log(String msg)
Displays a message.

Parameters:
msg - the message to display.

log

protected abstract void log(Throwable t)
Displays an exception.

Parameters:
t - the exception to display.

log

protected void log(int level,
                   Object msg,
                   Throwable t)

log

protected void log(int level,
                   Object msg)

getPrefix

protected String getPrefix(int level)

debug

public void debug(Object msg)
Specified by:
debug in interface LogService

debug

public void debug(Throwable t)
Specified by:
debug in interface LogService

debug

public void debug(Object msg,
                  Throwable t)
Specified by:
debug in interface LogService

error

public void error(Object msg)
Specified by:
error in interface LogService

error

public void error(Throwable t)
Specified by:
error in interface LogService

error

public void error(Object msg,
                  Throwable t)
Specified by:
error in interface LogService

info

public void info(Object msg)
Specified by:
info in interface LogService

info

public void info(Throwable t)
Specified by:
info in interface LogService

info

public void info(Object msg,
                 Throwable t)
Specified by:
info in interface LogService

trace

public void trace(Object msg)
Specified by:
trace in interface LogService

trace

public void trace(Throwable t)
Specified by:
trace in interface LogService

trace

public void trace(Object msg,
                  Throwable t)
Specified by:
trace in interface LogService

warn

public void warn(Object msg)
Specified by:
warn in interface LogService

warn

public void warn(Throwable t)
Specified by:
warn in interface LogService

warn

public void warn(Object msg,
                 Throwable t)
Specified by:
warn in interface LogService

isDebug

public boolean isDebug()
Specified by:
isDebug in interface LogService

isError

public boolean isError()
Specified by:
isError in interface LogService

isInfo

public boolean isInfo()
Specified by:
isInfo in interface LogService

isTrace

public boolean isTrace()
Specified by:
isTrace in interface LogService

isWarn

public boolean isWarn()
Specified by:
isWarn in interface LogService

getLevel

public int getLevel()
Specified by:
getLevel in interface LogService

setLevel

public void setLevel(int level)
Specified by:
setLevel in interface LogService

setLevel

public void setLevel(String classOrPackageName,
                     int level)


Copyright © 2009–2014 SciJava. All rights reserved.