Duct module that provides a Cloudwatch Timbre log appender. The library does batching and rate limiting considering Cloudwatch PutLogEvents API service quota limitations.
To use this module just include the dev.gethop.timbre.appenders/cloudwatch key to your modules configuration in the config.edn.
The module requires the following mandatory keys:
log-group-name: The Cloudwatch's log group name.batch-config: The batch configuration requires the following mandatory keys:size: The maximum number oflog-eventsto be sent in one batch.timeout: The amount of time in ms that thebatch-log-queueshould wait before sending the batch if the maximum batchsizehas not been reached. The timeout resets every time there is a newlog-evententry in thebatch-log-queue.
The module also accepts the following optional keys:
appender-config: Configuration for the Timbre's appender:min-level: Minimum logging level. It defaults to:info.
client-config: Extra configuration for the aws-api client used to interact with the Cloudwatch API:
{:dev.gethop.timbre.appenders.module/cloudwatch
{:log-group-name "/aws/eb/hop-test"
:batch-config {:size 1000 :timeout 300}}}Copyright (c) 2024 Biotz, SL.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/