com.dynamide
Class SessionWebMacroLogTarget

java.lang.Object
  extended by com.dynamide.SessionWebMacroLogTarget
All Implemented Interfaces:
org.webmacro.util.LogTarget

public class SessionWebMacroLogTarget
extends java.lang.Object
implements org.webmacro.util.LogTarget


Constructor Summary
SessionWebMacroLogTarget()
           
 
Method Summary
 void addObserver(org.webmacro.util.LogSystem ls)
          A LogSystem will register itself though this method in order to detect changes to the LogTarget.
 java.lang.String dump()
           
 void flush()
          Flush the log.
 void log(java.util.Date date, java.lang.String type, java.lang.String level, java.lang.String message, java.lang.Throwable e)
           
 void log(java.lang.String message)
           
 void removeObserver(org.webmacro.util.LogSystem ls)
          A LogSystem may remove itself through this method if it de-registeres the LogTarget.
 boolean subscribe(java.lang.String category, java.lang.String type, int logLevel)
          Return true or false if this log target would like to receive log messages for the named category, type, and logLevel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionWebMacroLogTarget

public SessionWebMacroLogTarget()
                         throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException
Method Detail

dump

public java.lang.String dump()

log

public void log(java.lang.String message)

log

public void log(java.util.Date date,
                java.lang.String type,
                java.lang.String level,
                java.lang.String message,
                java.lang.Throwable e)
Specified by:
log in interface org.webmacro.util.LogTarget

flush

public void flush()
Flush the log. This will be called after writing methods that are notice, warning, or error messages.

Specified by:
flush in interface org.webmacro.util.LogTarget

subscribe

public boolean subscribe(java.lang.String category,
                         java.lang.String type,
                         int logLevel)
Return true or false if this log target would like to receive log messages for the named category, type, and logLevel. This method must return the same value every time it is called with the same arguments.

The logLevel you will be called with is one of the integers Log.ALL, Log.DEBUG, Log.INFO, Log.NOTICE, Log.WARNING, Log.ERROR, and Log.NONE in ascending order (Log.ERROR is a higher number than Log.WARNING which is a higher number than Log.DEBUG). In other words, the higher the logLevel the more important the log message is.

Specified by:
subscribe in interface org.webmacro.util.LogTarget

addObserver

public void addObserver(org.webmacro.util.LogSystem ls)
A LogSystem will register itself though this method in order to detect changes to the LogTarget. LogTargets should notify all observers when any setting changes that might affect the return value of the subscribe(...) method.

Specified by:
addObserver in interface org.webmacro.util.LogTarget

removeObserver

public void removeObserver(org.webmacro.util.LogSystem ls)
A LogSystem may remove itself through this method if it de-registeres the LogTarget. After this method the supplied observer should no longer receive notification of updates.

Specified by:
removeObserver in interface org.webmacro.util.LogTarget


Copyright © 2001-2013 DYNAMIDE.COM. All Rights Reserved.