PTLog API - 1.0

jp.ne.dti.lares.foozy.ptlog.log4j
Class DefaultTypeConverter

java.lang.Object
  extended byjp.ne.dti.lares.foozy.ptlog.log4j.DefaultTypeConverter
All Implemented Interfaces:
TypeConverter

public class DefaultTypeConverter
extends java.lang.Object
implements TypeConverter

Default implementation for Log4j.

This converts:

and the other types are converted to Level.ALL.

Register your custom TypeConverter at Log4jProvider.INSTANCE, if you want to override above conversion.


Field Summary
static DefaultTypeConverter INSTANCE
          Convenience to use this class without construction.
 
Constructor Summary
DefaultTypeConverter()
          Constructor.
 
Method Summary
 java.lang.Object convert(LogType type)
          Convert from type to Level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final DefaultTypeConverter INSTANCE
Convenience to use this class without construction.

Constructor Detail

DefaultTypeConverter

public DefaultTypeConverter()
Constructor.

Method Detail

convert

public java.lang.Object convert(LogType type)
Convert from type to Level.

This returns Level.DEBUG, if there are no conversion entries for specified type.

Specified by:
convert in interface TypeConverter
Parameters:
type - to be converted.
Returns:
conversion result, or null if specified type is out of interest.

PTLog API - 1.0