org.castor.tools.log4j

Class LogReferenceExtension


public final class LogReferenceExtension
extends LogEntry

A LogReferenceExtension for saving a reference to another object. Use in that way e.g.: LOG.warn(object).

To write your own extension, the following requirements has to be fulfilled: 1. The customized class must extend the LogEntry class. 2. A table in the database must be created. 3. The castor mapping file must be customized for the new class. As base the existing one can be used.

Version:
$Id: TNSAddress.java,v 1.2 2006/08/08 14:42:48 holger Exp $
Author:
Holger West, Syscon Ingenieurb?ro f?r Mess- und Datentechnik GmbH.

Constructor Summary

LogReferenceExtension()
Default constructor.
LogReferenceExtension(String message, String type, String value)
Construct a new LogReferenceExtension with the given message, type and value.

Method Summary

String
getType()
Get the type this object references to.
String
getValue()
Get the value this object references to.
void
setType(String type)
Set the type this object references to.
void
setValue(String value)
Set the value this object references to.

Methods inherited from class org.castor.tools.log4j.LogEntry

getClassName, getCount, getException, getId, getLevel, getMessage, getThread, getTimestamp, setClassName, setCount, setException, setId, setLevel, setMessage, setThread, setTimestamp

Constructor Details

LogReferenceExtension

public LogReferenceExtension()
Default constructor.

LogReferenceExtension

public LogReferenceExtension(String message,
                             String type,
                             String value)
Construct a new LogReferenceExtension with the given message, type and value.
Parameters:
message - The message to set for this object.
type - The type this oject references to.
value - The value this object references to.

Method Details

getType

public String getType()
Get the type this object references to.
Returns:
The type this object references to.

getValue

public String getValue()
Get the value this object references to.
Returns:
The value this object references to.

setType

public void setType(String type)
Set the type this object references to.
Parameters:
type - The type this object references to.

setValue

public void setValue(String value)
Set the value this object references to.
Parameters:
value - The value this object references to.

Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com