public class TextMessageBuilder extends java.lang.Object implements MessageBuilder
| Modifier and Type | Field and Description |
|---|---|
private Formatter |
m_formatter |
private PropertyInfo[] |
m_properties |
| Constructor and Description |
|---|
TextMessageBuilder(Formatter formatter)
Creation of a new text message builder.
|
TextMessageBuilder(PropertyInfo[] properties,
Formatter formatter)
Creation of a new text message builder.
|
| Modifier and Type | Method and Description |
|---|---|
Message |
buildMessage(Session session,
LogEvent event)
Build a message from the supplied session for the supplied event
|
private java.lang.String |
getContextMap(ContextMap map,
java.lang.String aux) |
private java.lang.String |
getStackTrace(java.lang.Throwable throwable) |
private java.lang.String |
getText(LogEvent event) |
private void |
setProperty(TextMessage message,
int index,
LogEvent event)
Set a property
|
private final PropertyInfo[] m_properties
private final Formatter m_formatter
public TextMessageBuilder(Formatter formatter)
formatter - the message formatterpublic TextMessageBuilder(PropertyInfo[] properties, Formatter formatter)
properties - the property info setformatter - the message formatterpublic Message buildMessage(Session session,
LogEvent event)
throws JMSException
buildMessage in interface MessageBuildersession - the sessionevent - the log eventJMSException - if a messaging related error occursprivate void setProperty(TextMessage message,
int index,
LogEvent event)
throws JMSException
message - the text messageindex - the indexevent - the log eventJMSExceptionprivate java.lang.String getText(LogEvent event)
private java.lang.String getStackTrace(java.lang.Throwable throwable)
private java.lang.String getContextMap(ContextMap map, java.lang.String aux)