edu.stanford.nlp.util.logging
Class Redwood.Record

java.lang.Object
  extended by edu.stanford.nlp.util.logging.Redwood.Record
Enclosing class:
Redwood

public static class Redwood.Record
extends Object

A log record, which encapsulates the information needed to eventually display the enclosed message.


Field Summary
 String callingClass
           
 String callingMethod
           
 Object content
           
 int depth
           
 long thread
           
 long timesstamp
           
 
Constructor Summary
protected Redwood.Record(Object content, Object[] channels, int depth, StackTraceElement stackTraceElement, long timestamp)
          Create a new Record, based on the content of the log, the channels, and the depth
protected Redwood.Record(Object content, Object[] channels, int depth, String callingClass, String callingMethod, long timestamp)
          Create a new Record, based on the content of the log, the channels, and the depth
 
Method Summary
 Object[] channels()
          Returns the channels for this record, in sorted order (special channels first, then alphabetical)
 boolean force()
          Returns whether this log message wants to be forced to be printed
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

content

public final Object content

depth

public final int depth

callingClass

public final String callingClass

callingMethod

public final String callingMethod

timesstamp

public final long timesstamp

thread

public final long thread
Constructor Detail

Redwood.Record

protected Redwood.Record(Object content,
                         Object[] channels,
                         int depth,
                         StackTraceElement stackTraceElement,
                         long timestamp)
Create a new Record, based on the content of the log, the channels, and the depth

Parameters:
content - An object (usually String) representing the log contents
channels - A set of channels to publish this record to
depth - The depth of the log message
stackTraceElement - The stack trace element to extract the calling class and method from
timestamp - The time this record was created

Redwood.Record

protected Redwood.Record(Object content,
                         Object[] channels,
                         int depth,
                         String callingClass,
                         String callingMethod,
                         long timestamp)
Create a new Record, based on the content of the log, the channels, and the depth

Parameters:
content - An object (usually String) representing the log contents
channels - A set of channels to publish this record to
depth - The depth of the log message
callingClass - The class this record should claim to be called from
callingMethod - The method this record should claim to be called from
Method Detail

force

public boolean force()
Returns whether this log message wants to be forced to be printed

Returns:
true if the FORCE flag is set on this message

channels

public Object[] channels()
Returns the channels for this record, in sorted order (special channels first, then alphabetical)

Returns:
A sorted list of channels

toString

public String toString()
Overrides:
toString in class Object


Stanford NLP Group