|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.log.LogEntry
public class LogEntry
Contains one log entry.
Copyright (c) Enough Software 2005 - 2009
history
23-Apr-2005 - rob creation
| Field Summary | |
|---|---|
String |
className
|
String |
exception
|
String |
level
|
int |
lineNumber
|
String |
message
|
String |
thread
|
long |
time
|
| Constructor Summary | |
|---|---|
|
LogEntry(String className,
int lineNumber,
long time,
String level,
String message,
String exception)
Creates a new log entry, |
protected |
LogEntry(String className,
int lineNumber,
long time,
String level,
String message,
String exception,
String threadName)
Creates a new log entry, |
| Method Summary | |
|---|---|
String |
getMessage()
Retrieves the message of this entry |
static LogEntry |
newLogEntry(byte[] data)
Reads a new log entry from the given input stream |
static LogEntry |
newLogEntry(DataInputStream in)
Reads a new log entry from the given input stream |
byte[] |
toByteArray()
Writes the data into a byte buffer. |
String |
toString()
Converts the entry into a log message. |
void |
write(DataOutputStream out)
Writes this log entry to the given output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final String className
public final long time
public final String level
public final String message
public final int lineNumber
public final String exception
public final String thread
| Constructor Detail |
|---|
public LogEntry(String className,
int lineNumber,
long time,
String level,
String message,
String exception)
className - the name of the classlineNumber - the line number within the classtime - the time of the log eventlevel - the level, e.g. "debug" or "info"message - the messageexception - the exception message, if any
protected LogEntry(String className,
int lineNumber,
long time,
String level,
String message,
String exception,
String threadName)
className - the name of the classlineNumber - the line number within the classtime - the time of the log eventlevel - the level, e.g. "debug" or "info"message - the messageexception - the exception message, if anythreadName - the name of the current thread, always null on CLDC 1.0 devices| Method Detail |
|---|
public byte[] toByteArray()
throws IOException
IOException - when the data could not be writtenpublic String toString()
toString in class Object
public void write(DataOutputStream out)
throws IOException
out - the output to which this entry should be writen.
IOException - when the data could not be written
public static LogEntry newLogEntry(byte[] data)
throws IOException
data - the data
IOException - when the data could not be read
public static LogEntry newLogEntry(DataInputStream in)
throws IOException
in - the input from which the data is read
IOException - when the data could not be readpublic String getMessage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||