public class SqlTimingOccurredMessage extends SqlMessage implements org.apache.logging.log4j.message.Message
SqlMessage
related to the logging of SQL statements, with execution time information.log4j2.Log4j2SpyLogDelegator
,
Serialized Formnl
Constructor and Description |
---|
SqlTimingOccurredMessage()
Default Constructor
|
SqlTimingOccurredMessage(Spy spy,
long execTime,
String methodCall,
String sql,
boolean isDebugEnabled) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildMessage()
Populate the
message attribute. |
getDebugInfo, getFormat, getFormattedMessage, getMessage, getParameters, getThrowable, isDebugEnabled, processSql, setDebugEnabled, setMessage
public SqlTimingOccurredMessage()
public SqlTimingOccurredMessage(Spy spy, long execTime, String methodCall, String sql, boolean isDebugEnabled)
spy
- the Spy
wrapping the class where the SQL occurred.execTime
- how long it took the sql to run, in ms.methodCall
- a String
describing the name and call parameters
of the method that generated the SQL.sql
- A String
representing the sql that occurred.isDebugEnabled
- A boolean
to define whether debugInfo should be displayed.protected void buildMessage()
SqlMessage
message
attribute.
All subclasses can implement this method as they want,
but the outcome must be to assign a String
not null
to the message
attribute.
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.