|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.tenduke.diagnostics.LogEntry
public class LogEntry
Class that represents an application event that needs to be logged.
A log entry is composed of an LogEntry.EventType, LogEntry.DebugLevel,
optional message and optional handle to related Exception / Throwable.
LogEntry.EventType defines the category in terms of severity.
LogEntry.DebugLevel defines the verbosity level of the log entry and is commonly used by
LogEntrySubscribers to suppress the display / processing of log entries
that exceed maximum configured verbosity level.
| Nested Class Summary | |
|---|---|
static class |
LogEntry.DebugLevel
Log entry debug level. |
static class |
LogEntry.EventType
Log entry categorization by event type: (info / warning / error). |
| Constructor Summary | |
|---|---|
LogEntry(LogEntry.EventType eventType,
LogEntry.DebugLevel debugLevel,
java.lang.String logMessage)
Creates a new LogEntry with log message that describes the event. |
|
LogEntry(LogEntry.EventType eventType,
LogEntry.DebugLevel debugLevel,
java.lang.String logMessage,
java.lang.String category)
Creates a new LogEntry with log message that describes the event. |
|
LogEntry(LogEntry.EventType eventType,
LogEntry.DebugLevel debugLevel,
java.lang.String logMessage,
java.lang.Throwable exception)
Creates a new LogEntry with log message that describes the event and a related exception. |
|
LogEntry(LogEntry.EventType eventType,
LogEntry.DebugLevel debugLevel,
java.lang.String logMessage,
java.lang.Throwable exception,
java.lang.String category)
Creates a new LogEntry with log message that describes the event and a related exception. |
|
LogEntry(LogEntry.EventType eventType,
LogEntry.DebugLevel debugLevel,
java.lang.Throwable exception)
Creates a new LogEntry with log message that describes the event and a related exception. |
|
LogEntry(LogEntry.EventType eventType,
LogEntry.DebugLevel debugLevel,
java.lang.Throwable exception,
java.lang.String category)
Creates a new LogEntry with log message that describes the event and a related exception. |
|
| Method Summary | |
|---|---|
java.lang.String |
getCategory()
Gets log entry category. |
LogEntry.DebugLevel |
getDebugLevel()
Gets the debug level for this entry. |
LogEntry.EventType |
getEventType()
Gets the event type set for this entry. |
java.lang.Throwable |
getException()
Gets the exception set for this entry. |
java.lang.String |
getLogMessage()
Gets the log message set for this entry. |
void |
print(java.lang.String formatString,
java.io.Writer outWriter)
Printing formatted log message. |
void |
setCategory(java.lang.String category)
Sets log entry category. |
java.lang.String |
toString()
Basic toString implementation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LogEntry(LogEntry.EventType eventType,
LogEntry.DebugLevel debugLevel,
java.lang.String logMessage)
eventType - Log entry categorization by event type (info / warning / error)debugLevel - Debug level (1-5): 1 is for the most critical stuff, 5 for very verbose debug output only.logMessage - Message describing the log event
public LogEntry(LogEntry.EventType eventType,
LogEntry.DebugLevel debugLevel,
java.lang.String logMessage,
java.lang.String category)
eventType - Log entry categorization by event type (info / warning / error)debugLevel - Debug level (1-5): 1 is for the most critical stuff, 5 for very verbose debug output only.logMessage - Message describing the log eventcategory - Category of the LogEntry that may be used by LogEntrySubscribes to direct LogEntries to different log files etc.
For instance, different extensions may define their own categories. Null category is the default category.
public LogEntry(LogEntry.EventType eventType,
LogEntry.DebugLevel debugLevel,
java.lang.String logMessage,
java.lang.Throwable exception)
eventType - Log entry categorization by event type (info / warning / error)debugLevel - Debug level (1-5): 1 is for the most critical stuff, 5 for very verbose debug output only.logMessage - Message describing the log eventexception - Exception related to the event
public LogEntry(LogEntry.EventType eventType,
LogEntry.DebugLevel debugLevel,
java.lang.String logMessage,
java.lang.Throwable exception,
java.lang.String category)
eventType - Log entry categorization by event type (info / warning / error)debugLevel - Debug level (1-5): 1 is for the most critical stuff, 5 for very verbose debug output only.logMessage - Message describing the log eventexception - Exception related to the eventcategory - Category of the LogEntry that may be used by LogEntrySubscribes to direct LogEntries to different log files etc.
For instance, different extensions may define their own categories. Null category is the default category.
public LogEntry(LogEntry.EventType eventType,
LogEntry.DebugLevel debugLevel,
java.lang.Throwable exception)
eventType - Log entry categorization by event type (info / warning / error)debugLevel - Debug level (1-5): 1 is for the most critical stuff, 5 for very verbose debug output only.exception - Exception related to the event
public LogEntry(LogEntry.EventType eventType,
LogEntry.DebugLevel debugLevel,
java.lang.Throwable exception,
java.lang.String category)
eventType - Log entry categorization by event type (info / warning / error)debugLevel - Debug level (1-5): 1 is for the most critical stuff, 5 for very verbose debug output only.exception - Exception related to the eventcategory - Category of the LogEntry that may be used by LogEntrySubscribes to direct LogEntries to different log files etc.
For instance, different extensions may define their own categories. Null category is the default category.| Method Detail |
|---|
public java.lang.String getCategory()
public LogEntry.DebugLevel getDebugLevel()
public LogEntry.EventType getEventType()
public java.lang.Throwable getException()
public java.lang.String getLogMessage()
public void print(java.lang.String formatString,
java.io.Writer outWriter)
throws java.io.IOException
Printing formatted log message.
Supported format modifiers:
formatString - The string to format (may include format specifiers).outWriter - Where output goes.
java.io.IOException - if an error occurred when writing to outWriterpublic void setCategory(java.lang.String category)
category - Category of the LogEntry that may be used by LogEntrySubscribes to direct LogEntries to different log files etc.
For instance, different extensions may define their own categories. Null category is the default category.public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||