|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.plt.debug.TextLogSink
public abstract class TextLogSink
A LogSink that formats its messages as lines of text. Subclasses are responsible for writing that text to an appropriate location.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface edu.rice.cs.plt.debug.LogSink |
|---|
LogSink.EndMessage, LogSink.ErrorMessage, LogSink.Message, LogSink.MessageVisitor<T>, LogSink.StackMessage, LogSink.StandardMessage, LogSink.StartMessage, LogSink.ValueMessage |
| Constructor Summary | |
|---|---|
protected |
TextLogSink()
|
protected |
TextLogSink(int idealLineWidth)
|
| Method Summary | |
|---|---|
protected static String |
formatLocation(Option<StackTraceElement> location)
Convert a location to a string of the form "edu.rice.cs.plt.debug.TextLogSink.formatLocation(24)" |
protected static String |
formatLocation(StackTraceElement location)
Convert a location to a string of the form "edu.rice.cs.plt.debug.TextLogSink.formatLocation(24)" |
protected static String |
formatThread(ThreadSnapshot thread)
Convert a thread to a string of the form "Custom Thread 22", consisting of the thread's
name and id. |
protected static String |
formatTime(Date time)
Convert a time to a string of the form "12:23:03.013" |
void |
log(LogSink.StandardMessage m)
|
void |
logEnd(LogSink.EndMessage m)
|
void |
logError(LogSink.ErrorMessage m)
|
void |
logStack(LogSink.StackMessage m)
|
void |
logStart(LogSink.StartMessage m)
|
protected abstract void |
write(LogSink.Message m,
SizedIterable<String> text)
Record the given message, the body of which is described by the given lines of text. |
protected abstract void |
writeEnd(LogSink.EndMessage m,
SizedIterable<String> text)
Record the given end message, the body of which is described by the given lines of text. |
protected abstract void |
writeStart(LogSink.StartMessage m,
SizedIterable<String> text)
Record the given start message, the body of which is described by the given lines of text. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.io.Closeable |
|---|
close |
| Constructor Detail |
|---|
protected TextLogSink()
protected TextLogSink(int idealLineWidth)
| Method Detail |
|---|
protected abstract void write(LogSink.Message m,
SizedIterable<String> text)
synchronized.
protected abstract void writeStart(LogSink.StartMessage m,
SizedIterable<String> text)
synchronized.
protected abstract void writeEnd(LogSink.EndMessage m,
SizedIterable<String> text)
synchronized.
protected static String formatTime(Date time)
"12:23:03.013"
protected static String formatThread(ThreadSnapshot thread)
"Custom Thread 22", consisting of the thread's
name and id.
protected static String formatLocation(Option<StackTraceElement> location)
"edu.rice.cs.plt.debug.TextLogSink.formatLocation(24)"
protected static String formatLocation(StackTraceElement location)
"edu.rice.cs.plt.debug.TextLogSink.formatLocation(24)"
public void log(LogSink.StandardMessage m)
log in interface LogSinkpublic void logStart(LogSink.StartMessage m)
logStart in interface LogSinkpublic void logEnd(LogSink.EndMessage m)
logEnd in interface LogSinkpublic void logError(LogSink.ErrorMessage m)
logError in interface LogSinkpublic void logStack(LogSink.StackMessage m)
logStack in interface LogSink
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||