-
Notifications
You must be signed in to change notification settings - Fork 995
Open
Description
Description
To simplify log analysis across different monitoring stacks, please add an option to output logs in JSON format. While export LOG4J_CONFIGURATION_FILE=./debug.xml allows for custom log configurations, it is a bit of an overhead for most users.
Additional Information (Add any of the following or anything else that may be relevant)
Previously, users who wanted structured JSON logging (e.g., for Elasticsearch, Google Cloud Logging, or Graylog) had to:
- Create a custom Log4j2 XML configuration file
- Mount or inject this file into their deployment
- Specify
LOG4J_CONFIGURATION_FILE=./debug.xml
New --logging-format CLI option that enables users to programmatically select structured logging formats without requiring custom Log4j2 configuration files. This is particularly useful in containerized and cloud environments where injecting configuration files is cumbersome.
New CLI option: --logging-format= with support for:
- PLAIN (default) - Traditional pattern-based console logging
- ECS - Elastic Common Schema JSON format
- GCP - Google Cloud Platform JSON format
- LOGSTASH - Logstash JSON Event Layout V1
- GELF - Graylog Extended Log Format
Metadata
Metadata
Assignees
Labels
No labels