Skip to content

feat: Add --logging-format CLI option for structured logging (ECS, GCP, LOGSTASH, PLAIN) #9626

@blevkivskyi-everstake

Description

@blevkivskyi-everstake

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions