|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Loggable
Interface for all loggable objects.
| Method Summary | |
|---|---|
void |
addParameter(String name,
Serializable value)
Add a new parameter to the Loggable. |
Throwable |
getCause()
Returns the cause of this throwable or null if the
cause is nonexistent or unknown. |
long |
getEventTime()
Returns the point in time when the event occurred. |
String |
getInstanceId()
Returns the instance identifier of the process that generated this Loggable. |
LogMessageInfo |
getLogMessageInfo()
Returns the LogMessageInfo for this Loggable. |
String |
getMessage()
Returns the (Detail) message of this loggable. |
String |
getNodeId()
Returns the ip-address or the host name where the Loggable was created. |
List |
getParameter(String name)
Returns a list of all parameters with the given name. |
Set |
getParameterNames()
Returns a set of available parameters. |
String |
getSourceClass()
Tries to find the source class name where this log event was fired. |
String |
getSourceMethod()
Tries to find the source method where this log event was fired. |
long |
getThreadId()
Returns the thread id of the thread that created this Loggable. |
String |
getThreadName()
Returns the thread name as it was valid at the time of creation of this Loggable. |
String |
getTrackingNumber()
Returns the (unique) tracking number of this Loggable instance. |
void |
log()
Logs this Loggable into the appropriate log
sink. |
String |
toDetailedString()
The toString method of Loggable must dump out all
information stored within this loggable in a readable way. |
String |
toString()
The toString method of Loggable dumps the
String representation of the class name of the loggable
and the contained message. |
| Method Detail |
|---|
void addParameter(String name,
Serializable value)
Loggable.
All parameters are always added to the Loggable.
There is no way of changing or removing a parameter. Once the
Loggable was asked for one of it's values there
should not be a new parameter. Nevertheless
implementations of this interface MUST not throw an exception
if this happens.
Multiple parameters with the same name are stored within
the Loggable.
Values must be Serializable and have a useful
to String representation. If the value is not serializable
it might be sufficient to store the String representation
of the value. The Loggable is not responsible
to make a deep copy of the value. The calling code should
take care for this. To solve this a possible solution
would again be to use the String representation of the
value.
name - the name of the parameter to be added.value - the value for the parameter.List getParameter(String name)
name must not start with an _
character. These are reserved for internal use.
name - The name of the parameter to be retrieved.
Set getParameterNames()
LogMessageInfo getLogMessageInfo()
LogMessageInfo for this Loggable.
LogMessageInfo for this Loggable.String getTrackingNumber()
Loggable instance.
Loggable instance.String getMessage()
LogMessageInfo and parameters.
The field might get truncated on the presentation layer.
long getEventTime()
Loggable object was created.
String getNodeId()
String getInstanceId()
long getThreadId()
Loggable.
Loggable.String getThreadName()
Loggable.
Loggable.Thread.getName()Throwable getCause()
null if the
cause is nonexistent or unknown. (The cause is the throwable
that caused this throwable to get thrown.)
The returned object might be a Loggable.
null if the
cause is nonexistent or unknown.String toString()
Loggable dumps the
String representation of the class name of the loggable
and the contained message.
toString in class ObjectLoggable.String toDetailedString()
Loggable must dump out all
information stored within this loggable in a readable way. This
includes the information of possible nested data.
Loggable.void log()
Loggable into the appropriate log
sink.
String getSourceMethod()
StackTraceElement.getMethodName(),
StackTraceElement.getLineNumber()String getSourceClass()
StackTraceElement.getClassName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||