Caroline 80aaf54bb7
Minor changes to Data Prepper index.md. (#2426)
* Minor changes to index.md.

Signed-off-by: carolxob <carolxob@amazon.com>

* Minor typo/formatting fixes.

Signed-off-by: carolxob <carolxob@amazon.com>

* Minor change.

Signed-off-by: carolxob <carolxob@amazon.com>

* Adjusted ToC order so that Getting started appears before Core APIs.

Signed-off-by: carolxob <carolxob@amazon.com>

* Minor edits to titles.

Signed-off-by: carolxob <carolxob@amazon.com>

* Minor adjustments to ToC.

Signed-off-by: carolxob <carolxob@amazon.com>

* Changed filename.

Signed-off-by: carolxob <carolxob@amazon.com>

* Minor ToC edit

Signed-off-by: carolxob <carolxob@amazon.com>

* Minor edits.

Signed-off-by: carolxob <carolxob@amazon.com>

* Minor edit.

Signed-off-by: carolxob <carolxob@amazon.com>

* Edits made based on editorial feedback.

Signed-off-by: carolxob <carolxob@amazon.com>

Signed-off-by: carolxob <carolxob@amazon.com>
2023-01-23 11:32:57 -07:00

1.3 KiB

layout title nav_order
default Configuring Log4j 25

Configuring Log4j

You can configure logging using Log4j in Data Prepper.

Logging

Data Prepper uses SLF4J with a Log4j 2 binding.

For Data Prepper versions 2.0 and later, the Log4j 2 configuration file can be found and edited in config/log4j2.properties in the application's home directory. The default properties for Log4j 2 can be found in log4j2-rolling.properties in the shared-config directory.

For Data Prepper versions before 2.0, the Log4j 2 configuration file can be overridden by setting the log4j.configurationFile system property when running Data Prepper. The default properties for Log4j 2 can be found in log4j2.properties in the shared-config directory.

Example

When running Data Prepper, the following command can be overridden by setting the system property -Dlog4j.configurationFile={property_value}, where {property_value} is a path to the Log4j 2 configuration file:

java "-Dlog4j.configurationFile=config/custom-log4j2.properties" -jar data-prepper-core-$VERSION.jar pipelines.yaml data-prepper-config.yaml

See the Log4j 2 configuration documentation for more information about Log4j 2 configuration.