PTLog API - 1.0

jp.ne.dti.lares.foozy.ptlog.logapi
Class LogAPIProvider

java.lang.Object
  extended byjp.ne.dti.lares.foozy.ptlog.LogServer
      extended byjp.ne.dti.lares.foozy.ptlog.EffectiveLogServer
          extended byjp.ne.dti.lares.foozy.ptlog.ServiceProvider
              extended byjp.ne.dti.lares.foozy.ptlog.logapi.LogAPIProvider

public final class LogAPIProvider
extends ServiceProvider

Log service provider for adaptation to JDK logging API.

There are two ways to use JDK logging API as underlying logging framework of PTLog.

One of them is construction of LogTaps with INSTANCE.

Another way is invocation of setServer with INSTANCE on your LogTaps (or setServer on your LogDirector). This allows you to change configuration at runtime.

ATTENTION:

This class invokes constructor of base class with:

So, TypeConverter, which is registered to this, should convert from LogType to Level of JDK logging API.


Field Summary
static LogAPIProvider INSTANCE
          Use this because constructor is "private".
 
Method Summary
 LogContext getContext(java.lang.Object subject)
          Return LogAPILogContext.
 java.util.logging.Level getLevel(LogType type)
          Select effective Level for specified type.
 
Methods inherited from class jp.ne.dti.lares.foozy.ptlog.ServiceProvider
addTypeConverter, addTypeConverters, clearTypeConverter, convertType, removeTypeConverter
 
Methods inherited from class jp.ne.dti.lares.foozy.ptlog.EffectiveLogServer
addServee_, getServees, removeServee_
 
Methods inherited from class jp.ne.dti.lares.foozy.ptlog.LogServer
addServee, fireReconfigure, getSubjectName, removeServee
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final LogAPIProvider INSTANCE
Use this because constructor is "private".

Method Detail

getLevel

public final java.util.logging.Level getLevel(LogType type)
Select effective Level for specified type.


getContext

public LogContext getContext(java.lang.Object subject)
Return LogAPILogContext.

Specified by:
getContext in class LogServer
Parameters:
subject - of logging request.
Returns:
context for specified subject.
See Also:
LogAPILogContext

PTLog API - 1.0