public class CloudWatchLogWriter extends AbstractLogWriter
| Modifier and Type | Field and Description |
|---|---|
protected com.amazonaws.services.logs.AWSLogs |
client |
| Constructor and Description |
|---|
CloudWatchLogWriter(CloudWatchWriterConfig config,
CloudWatchAppenderStatistics stats) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createAWSClient()
Creates the appropriate AWS client.
|
protected int |
effectiveSize(LogMessage message)
Calculates the effective size of the message.
|
protected boolean |
ensureDestinationAvailable()
Verifies that the logging destination is available, including creating
it if not.
|
protected List<LogMessage> |
processBatch(List<LogMessage> currentBatch)
Processes a batch of messages.
|
protected boolean |
withinServiceLimits(int batchBytes,
int numMessages)
Determines whether the provided batch size or number of messages would
exceed the service's limits.
|
addMessage, buildBatch, getBatchCount, getBatchDelay, getClientFactoryUsed, initializationFailure, isInitializationComplete, run, setBatchDelay, setDiscardAction, setDiscardThreshold, stop, tryClientFactory, tryConfigureEndpointOrRegionpublic CloudWatchLogWriter(CloudWatchWriterConfig config, CloudWatchAppenderStatistics stats)
protected void createAWSClient()
AbstractLogWritercreateAWSClient in class AbstractLogWriterprotected boolean ensureDestinationAvailable()
AbstractLogWritertrue if successful, false
if not (which will cause the appender to stop running).ensureDestinationAvailable in class AbstractLogWriterprotected List<LogMessage> processBatch(List<LogMessage> currentBatch)
AbstractLogWriterprocessBatch in class AbstractLogWriterprotected int effectiveSize(LogMessage message)
AbstractLogWritereffectiveSize in class AbstractLogWriterprotected boolean withinServiceLimits(int batchBytes,
int numMessages)
AbstractLogWriterwithinServiceLimits in class AbstractLogWriterCopyright © 2018. All rights reserved.