public class MethodReturnedMessage extends SqlMessage implements org.apache.logging.log4j.message.Message
SqlMessage
related to the logging of methods calls returns.net.sf.log4jdbc.log4j2.Log4j2SpyLogDelegator#methodReturned(Spy, String, String)
,
Serialized Formnl
Constructor and Description |
---|
MethodReturnedMessage()
Default constructor.
|
MethodReturnedMessage(Spy spy,
String methodCall,
String returnMsg,
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 MethodReturnedMessage()
public MethodReturnedMessage(Spy spy, String methodCall, String returnMsg, boolean isDebugEnabled)
spy
- the Spy
wrapping the class that called the method that returned.methodCall
- a String
describing the name and call parameters of the method that returned.returnMsg
- return value converted to a String for integral types, or String representation for Object.
Will be null for void return types.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.