// Module included in the following assemblies:
//
// assembly-logging-configuration.adoc

:_mod-docs-content-type: CONCEPT
[id='con-external-logging-option_{context}']
= Configuring external logging

[role="_abstract"]
Use external logging when you need a reusable or advanced configuration.

External logging requires two steps:

. Create a `ConfigMap` that contains a complete `log4j2.properties` file.
. Reference the `ConfigMap` in the `spec.logging` property of the custom resource.

.Example external logging configuration
[source,yaml]
----
# ...
logging:
  type: external
  valueFrom:
    configMapKeyRef:
      # name and key are mandatory     
      name: my-config-map
      key: log4j2.properties
# ...
----

The Cluster Operator detects changes to the referenced `ConfigMap` and applies them dynamically without requiring a pod restart.