public class ExceptionOccuredMessage extends SqlMessage implements org.apache.logging.log4j.message.Message
SqlMessage
related to the logging of Exception
s.net.sf.log4jdbc.log4j2.Log4j2SpyLogDelegator#exceptionOccured(Spy, String, Exception, String, long)
,
Serialized Formnl
Constructor and Description |
---|
ExceptionOccuredMessage()
Default constructor
|
ExceptionOccuredMessage(Spy spy,
String methodCall,
String sql,
long execTime,
boolean isdebugEnabled) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildMessage()
Populate the
message attribute
using the attributes of this class. |
getDebugInfo, getFormat, getFormattedMessage, getMessage, getParameters, getThrowable, isDebugEnabled, processSql, setDebugEnabled, setMessage
public ExceptionOccuredMessage()
public ExceptionOccuredMessage(Spy spy, String methodCall, String sql, long execTime, boolean isdebugEnabled)
spy
- the Spy
wrapping the class that threw an Exception
.methodCall
- a String
describing the name and call parameters
of the method generated the Exception
.e
- the Exception
that was thrown.sql
- optional String
representing the sql that occurred
just before the exception occurred.execTime
- optional long
representing the amount of time
that passed before an Exception
was thrown when sql was being executed.
caller should pass -1 if not used.isDebugEnabled
- A boolean
to define whether debugInfo should be displayed.protected void buildMessage()
message
attribute
using the attributes of this class.
This method is called only when this Message
is actually logged,
avoiding useless concatenation costs, etc.buildMessage
in class SqlMessage
SqlMessage.message
Copyright © 2013 Bgee - Swiss Institute of Bioinformatics. All Rights Reserved.