From a754fc725909345e35f12463c51c546e47937987 Mon Sep 17 00:00:00 2001 From: Ry Biesemeyer Date: Wed, 1 Oct 2025 17:32:20 +0000 Subject: [PATCH 1/3] logstashbridge: map ES logging to log4j backend --- .../logstashbridge/common/LoggingBridge.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 libs/logstash-bridge/src/main/java/org/elasticsearch/logstashbridge/common/LoggingBridge.java diff --git a/libs/logstash-bridge/src/main/java/org/elasticsearch/logstashbridge/common/LoggingBridge.java b/libs/logstash-bridge/src/main/java/org/elasticsearch/logstashbridge/common/LoggingBridge.java new file mode 100644 index 0000000000000..a7a10d0070fff --- /dev/null +++ b/libs/logstash-bridge/src/main/java/org/elasticsearch/logstashbridge/common/LoggingBridge.java @@ -0,0 +1,25 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +package org.elasticsearch.logstashbridge.common; + +import org.elasticsearch.common.logging.LogConfigurator; + +/** + * An external bridge for the logging subsystem, exposing the minimum necessary + * to wire up the log4j-based implementation that is present in Logstash. + */ +public class LoggingBridge { + private LoggingBridge() {} + + public static void initialize() { + // wires up the ES logging front-end to a Log4j backend + LogConfigurator.configureESLogging(); + } +} From f2a3f4c470b584a493395d7eaa57893b957f6e51 Mon Sep 17 00:00:00 2001 From: Rye Biesemeyer Date: Thu, 2 Oct 2025 08:29:28 -0700 Subject: [PATCH 2/3] Update docs/changelog/135854.yaml --- docs/changelog/135854.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/changelog/135854.yaml diff --git a/docs/changelog/135854.yaml b/docs/changelog/135854.yaml new file mode 100644 index 0000000000000..f9d15fdfd8efd --- /dev/null +++ b/docs/changelog/135854.yaml @@ -0,0 +1,5 @@ +pr: 135854 +summary: "Logstashbridge: map ES logging to log4j backend" +area: Bridge +type: tech debt +issues: [] From 4c91644c302165aa42698d0a469c4b8c5509f361 Mon Sep 17 00:00:00 2001 From: Rye Biesemeyer Date: Thu, 2 Oct 2025 09:32:12 -0700 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com> --- docs/changelog/135854.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/changelog/135854.yaml b/docs/changelog/135854.yaml index f9d15fdfd8efd..b3a4f3d31bd13 100644 --- a/docs/changelog/135854.yaml +++ b/docs/changelog/135854.yaml @@ -1,5 +1,5 @@ pr: 135854 summary: "Logstashbridge: map ES logging to log4j backend" -area: Bridge -type: tech debt +area: Ingest +type: enhancement issues: []