PTLog API - 1.0

jp.ne.dti.lares.foozy.ptlog
Class EffectiveLogBuffer

java.lang.Object
  extended byjp.ne.dti.lares.foozy.ptlog.EffectiveLogBuffer
All Implemented Interfaces:
LogBuffer

public class EffectiveLogBuffer
extends java.lang.Object
implements LogBuffer

Implementation to do logging.

See Also:
NullLogBuffer

Constructor Summary
EffectiveLogBuffer(LogContext context, LogType type, java.lang.String method, UniversalFormatter formatter)
          Constructor.
 
Method Summary
 void add(java.lang.Object value)
          Add information about un-named value to log record.
 void add(java.lang.Object value, ObjectFormatter formatter)
          Add information about un-named value to log record.
 void add(java.lang.String name, byte value)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Byte value)
          Add information about named value to log record.
 void add(java.lang.String name, byte value, ByteFormatter formatter)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Byte value, ByteFormatter formatter)
          Add information about named value to log record.
 void add(java.lang.String name, char value)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Character value)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Character value, CharFormatter formatter)
          Add information about named value to log record.
 void add(java.lang.String name, char value, CharFormatter formatter)
          Add information about named value to log record.
 void add(java.lang.String name, double value)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Double value)
          Add information about named value to log record.
 void add(java.lang.String name, double value, DoubleFormatter formatter)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Double value, DoubleFormatter formatter)
          Add information about named value to log record.
 void add(java.lang.String name, float value)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Float value)
          Add information about named value to log record.
 void add(java.lang.String name, float value, FloatFormatter formatter)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Float value, FloatFormatter formatter)
          Add information about named value to log record.
 void add(java.lang.String name, int value)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Integer value)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Integer value, IntFormatter formatter)
          Add information about named value to log record.
 void add(java.lang.String name, int value, IntFormatter formatter)
          Add information about named value to log record.
 void add(java.lang.String name, long value)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Long value)
          Add information about named value to log record.
 void add(java.lang.String name, long value, LongFormatter formatter)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Long value, LongFormatter formatter)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Object value)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Object value, ObjectFormatter formatter)
          Add information about named value to log record.
 void add(java.lang.String name, short value)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Short value)
          Add information about named value to log record.
 void add(java.lang.String name, short value, ShortFormatter formatter)
          Add information about named value to log record.
 void add(java.lang.String name, java.lang.Short value, ShortFormatter formatter)
          Add information about named value to log record.
 void flush()
          Flush buffered log information.
 void setMessage(java.lang.String message)
          Set message which may describes about buffered information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EffectiveLogBuffer

public EffectiveLogBuffer(LogContext context,
                          LogType type,
                          java.lang.String method,
                          UniversalFormatter formatter)
Constructor.

"formatter" is used at invocation of byte, char, short, int, long, float, double and Object logging without formatter.

It is also used to determine delimiter between each values.

Parameters:
context - of logging
type - of logging
method - where logging is invoked
formatter - to format information value
Method Detail

setMessage

public void setMessage(java.lang.String message)
Description copied from interface: LogBuffer
Set message which may describes about buffered information.

Specified by:
setMessage in interface LogBuffer
Parameters:
message - describing about buffered information.

add

public void add(java.lang.String name,
                byte value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                byte value,
                ByteFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultByteFormatter.S_OCT, DefaultByteFormatter.U_OCT, DefaultByteFormatter.S_DEC, DefaultByteFormatter.U_DEC, DefaultByteFormatter.S_HEX, DefaultByteFormatter.U_HEX

add

public void add(java.lang.String name,
                java.lang.Byte value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                java.lang.Byte value,
                ByteFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultByteFormatter.S_OCT, DefaultByteFormatter.U_OCT, DefaultByteFormatter.S_DEC, DefaultByteFormatter.U_DEC, DefaultByteFormatter.S_HEX, DefaultByteFormatter.U_HEX

add

public void add(java.lang.String name,
                char value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                char value,
                CharFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultCharFormatter.CHAR, DefaultCharFormatter.U_OCT, DefaultCharFormatter.U_DEC, DefaultCharFormatter.U_HEX

add

public void add(java.lang.String name,
                java.lang.Character value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                java.lang.Character value,
                CharFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultCharFormatter.CHAR, DefaultCharFormatter.U_OCT, DefaultCharFormatter.U_DEC, DefaultCharFormatter.U_HEX

add

public void add(java.lang.String name,
                short value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                short value,
                ShortFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultShortFormatter.S_OCT, DefaultShortFormatter.U_OCT, DefaultShortFormatter.S_DEC, DefaultShortFormatter.U_DEC, DefaultShortFormatter.S_HEX, DefaultShortFormatter.U_HEX

add

public void add(java.lang.String name,
                java.lang.Short value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                java.lang.Short value,
                ShortFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultShortFormatter.S_OCT, DefaultShortFormatter.U_OCT, DefaultShortFormatter.S_DEC, DefaultShortFormatter.U_DEC, DefaultShortFormatter.S_HEX, DefaultShortFormatter.U_HEX

add

public void add(java.lang.String name,
                int value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                int value,
                IntFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultIntFormatter.S_OCT, DefaultIntFormatter.U_OCT, DefaultIntFormatter.S_DEC, DefaultIntFormatter.U_DEC, DefaultIntFormatter.S_HEX, DefaultIntFormatter.U_HEX

add

public void add(java.lang.String name,
                java.lang.Integer value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                java.lang.Integer value,
                IntFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultIntFormatter.S_OCT, DefaultIntFormatter.U_OCT, DefaultIntFormatter.S_DEC, DefaultIntFormatter.U_DEC, DefaultIntFormatter.S_HEX, DefaultIntFormatter.U_HEX

add

public void add(java.lang.String name,
                long value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                long value,
                LongFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultLongFormatter.S_OCT, DefaultLongFormatter.S_DEC, DefaultLongFormatter.S_HEX

add

public void add(java.lang.String name,
                java.lang.Long value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                java.lang.Long value,
                LongFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultLongFormatter.S_OCT, DefaultLongFormatter.S_DEC, DefaultLongFormatter.S_HEX

add

public void add(java.lang.String name,
                float value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                float value,
                FloatFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultFloatFormatter.INSTANCE

add

public void add(java.lang.String name,
                java.lang.Float value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                java.lang.Float value,
                FloatFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultFloatFormatter.INSTANCE

add

public void add(java.lang.String name,
                double value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                double value,
                DoubleFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultDoubleFormatter.INSTANCE

add

public void add(java.lang.String name,
                java.lang.Double value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                java.lang.Double value,
                DoubleFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultDoubleFormatter.INSTANCE

add

public void add(java.lang.String name,
                java.lang.Object value)
Description copied from interface: LogBuffer
Add information about named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log

add

public void add(java.lang.String name,
                java.lang.Object value,
                ObjectFormatter formatter)
Description copied from interface: LogBuffer
Add information about named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
name - of value
value - to record log
formatter - to format value
See Also:
DefaultObjectFormatter.INSTANCE

add

public void add(java.lang.Object value)
Description copied from interface: LogBuffer
Add information about un-named value to log record.

This will uses "default" formatter of implementation.

Specified by:
add in interface LogBuffer
Parameters:
value - to record log

add

public void add(java.lang.Object value,
                ObjectFormatter formatter)
Description copied from interface: LogBuffer
Add information about un-named value to log record.

Specified by:
add in interface LogBuffer
Parameters:
value - to record log
formatter - to format value
See Also:
DefaultObjectFormatter.INSTANCE

flush

public void flush()
Description copied from interface: LogBuffer
Flush buffered log information.

This method invocation clears internal buffered information.

You can reuse LogBuffer instance after flush() invocation.

Specified by:
flush in interface LogBuffer

PTLog API - 1.0