Configures a Kafka Bridge cluster.

Configuration options relate to:

* Kafka cluster bootstrap address
* Security (encryption, authentication, and authorization)
* Consumer configuration
* Producer configuration
* HTTP configuration

[id='property-kafka-bridge-logging-{context}']
= Logging

Kafka Bridge has its own preconfigured loggers:

[cols="1m,2,1",options="header"]
|===
| Logger     | Description                                          | Default Level

| rootLogger | Default logger for all classes                       | INFO
| bridge     | All classes in the `io.strimzi.kafka.bridge` package | INFO
| healthy    | Uses `http.openapi.operation.healthy` endpoint       | WARN
| ready      | Uses `http.openapi.operation.ready` endpoint         | WARN
|===

You can configure log levels directly for these loggers.
For example:

[source,yaml,subs="+quotes,attributes"]
----
apiVersion: {KafkaApiVersion}
kind: KafkaBridge
spec:
  # ...
  logging:
    type: inline
    loggers:
      rootLogger.level: INFO
      logger.ready.level: DEBUG
  # ...
----

You can also specify custom loggers for other operations:

* `createConsumer`
* `deleteConsumer`
* `subscribe`
* `unsubscribe`
* `poll`
* `assign`
* `commit`
* `send`
* `sendToPartition`
* `seekToBeginning`
* `seekToEnd`
* `seek`
* `openapi`

Each operation maps to an API endpoint,  defined according to the OpenAPI specification, and supports fine-grained logging via `http.openapi.operation.<operation_id>`.

For example, to set the logging level for the `send` operation logger:

[source,yaml,subs="+quotes,attributes"]
----
apiVersion: {KafkaApiVersion}
kind: KafkaBridge
spec:
  # ...
  logging:
    type: inline
    loggers:
      logger.send.name: http.openapi.operation.send
      logger.send.level: DEBUG
  # ...
----

Kafka Bridge uses the Apache `log4j2` logger implementation.
Use the `logging` property to configure loggers and logger levels.

You can set log levels using either the `inline` or `external` logging configuration types.

Specify loggers and levels directly in the custom resource for inline configuration:

.Example inline logging configuration
[source,yaml,subs="+quotes,attributes"]
----
apiVersion: {KafkaApiVersion}
kind: KafkaBridge
spec:
  # ...
  logging:
    type: inline
    loggers:
      rootLogger.level: INFO
      # enabling DEBUG for send operation
      logger.send.name: http.openapi.operation.send
      logger.send.level: DEBUG
  # ...
----

Alternatively, you can reference an external `ConfigMap` containing a complete `log4j2.properties` file that defines your own log4j2 configuration, including loggers, appenders, and layout configuration:

.Example external logging configuration
[source,yaml,subs="+quotes,attributes"]
----
apiVersion: {KafkaApiVersion}
kind: KafkaBridge
spec:
  # ...
  logging:
    type: external
    valueFrom:
      configMapKeyRef:
        # name and key are mandatory
        name: customConfigMap
        key: log4j2.properties
  # ...
----

.Garbage collector (GC)

Garbage collector logging can also be enabled (or disabled) using the xref:con-common-configuration-garbage-collection-reference[`jvmOptions` property].
