= logger
:type: metrics
:status: beta



////
     THIS FILE IS AUTOGENERATED!

     To make changes, edit the corresponding source file under:

     https://github.com/redpanda-data/connect/tree/main/internal/impl/<provider>.

     And:

     https://github.com/redpanda-data/connect/tree/main/cmd/tools/docs_gen/templates/plugin.adoc.tmpl
////

// © 2024 Redpanda Data Inc.


component_type_dropdown::[]


Prints aggregated metrics through the logger.

```yml
# Config fields, showing default values
metrics:
  logger:
    push_interval: "" # No default (optional)
    flush_metrics: false
  mapping: ""
```

Prints each metric produced by Benthos as a log event (level `info` by default) during shutdown, and optionally on an interval.

This metrics type is useful for debugging pipelines when you only have access to the logger output and not the service-wide server. Otherwise it's recommended that you use either the `prometheus` or `json_api`types.

== Fields

=== `push_interval`

An optional period of time to continuously print all metrics.


*Type*: `string`


=== `flush_metrics`

Whether counters and timing metrics should be reset to 0 each time metrics are printed.


*Type*: `bool`

*Default*: `false`


