public class SNSAppender extends AbstractAppender<SNSWriterConfig,SNSAppenderStatistics,SNSAppenderStatisticsMXBean>
appenderStats, batchDelay, clientEndpoint, clientFactory, discardAction, discardThreshold, lastRotationCount, lastRotationTimestamp, rotationInterval, rotationMode, sequence, threadFactory, writer, writerFactory| Constructor and Description |
|---|
SNSAppender() |
| Modifier and Type | Method and Description |
|---|---|
protected SNSWriterConfig |
generateWriterConfig()
Called just before a writer is created, so that the subclass can
perform substitutions on the configuration.
|
boolean |
getAutoCreate()
Returns the auto-create flag.
|
String |
getSubject()
Returns the current subject value, as set.
|
String |
getTopicArn()
Returns the configured topic ARN, without substitutions applied.
|
String |
getTopicName()
Returns the configured topic name, without substitutions applied.
|
protected boolean |
isMessageTooLarge(LogMessage message)
Called
AbstractAppender.append(org.apache.log4j.spi.LoggingEvent) to ensure that we don't have a single message
that violates AWS batching rules. |
void |
setAutoCreate(boolean value)
Sets the auto-create flag: if the topic is specified by name and does
not already exist, the writer will attempt to create it.
|
void |
setBatchDelay(long value)
Any configured batch delay will be ignored; the appender attempts to send
all messages as soon as they are appended.
|
void |
setSubject(String value)
Sets the subject that will be applied to messages; blank disables subjects.
|
void |
setTopicArn(String value)
Specifies the destination topic by ARN; the topic must already exist.
|
void |
setTopicName(String value)
Sets the topic name.
|
append, close, getAppenderStatistics, getBatchDelay, getClientEndpoint, getClientFactory, getDiscardAction, getDiscardThreshold, getRotationInterval, getRotationMode, getSequence, registerStatisticsBean, requiresLayout, rotate, setClientEndpoint, setClientFactory, setDiscardAction, setDiscardThreshold, setRotationInterval, setRotationMode, setSequence, unregisterStatisticsBeanpublic void setTopicName(String value)
Supports substitution values.
If you specify both topic name and topic ARN, the latter takes precedence. If no topic exists that matches the ARN, one will not be created.
public String getTopicName()
null if the topic has been configured by ARN.public void setTopicArn(String value)
Supports substitution values.
If you specify both topic name and topic ARN, the latter takes precedence.
public String getTopicArn()
null if the topic has been configured by name.public void setBatchDelay(long value)
setBatchDelay in class AbstractAppender<SNSWriterConfig,SNSAppenderStatistics,SNSAppenderStatisticsMXBean>public void setSubject(String value)
public String getSubject()
public void setAutoCreate(boolean value)
public boolean getAutoCreate()
protected SNSWriterConfig generateWriterConfig()
AbstractAppendergenerateWriterConfig in class AbstractAppender<SNSWriterConfig,SNSAppenderStatistics,SNSAppenderStatisticsMXBean>protected boolean isMessageTooLarge(LogMessage message)
AbstractAppenderAbstractAppender.append(org.apache.log4j.spi.LoggingEvent) to ensure that we don't have a single message
that violates AWS batching rules.isMessageTooLarge in class AbstractAppender<SNSWriterConfig,SNSAppenderStatistics,SNSAppenderStatisticsMXBean>Copyright © 2018. All rights reserved.