Skip to content

Commit f8ed310

Browse files
yaauiemashhurs
andauthored
logstashbridge: map ES logging to log4j backend (#135854)
* logstashbridge: map ES logging to log4j backend * Update docs/changelog/135854.yaml * Apply suggestions from code review Co-authored-by: Mashhur <[email protected]> --------- Co-authored-by: Mashhur <[email protected]>
1 parent 41a2a97 commit f8ed310

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

docs/changelog/135854.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 135854
2+
summary: "Logstashbridge: map ES logging to log4j backend"
3+
area: Ingest
4+
type: enhancement
5+
issues: []
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
package org.elasticsearch.logstashbridge.common;
11+
12+
import org.elasticsearch.common.logging.LogConfigurator;
13+
14+
/**
15+
* An external bridge for the logging subsystem, exposing the minimum necessary
16+
* to wire up the log4j-based implementation that is present in Logstash.
17+
*/
18+
public class LoggingBridge {
19+
private LoggingBridge() {}
20+
21+
public static void initialize() {
22+
// wires up the ES logging front-end to a Log4j backend
23+
LogConfigurator.configureESLogging();
24+
}
25+
}

0 commit comments

Comments
 (0)