From 9b76d31e3bea28253119cb30ab91946c57abfe5f Mon Sep 17 00:00:00 2001 From: Rodin Aarssen Date: Fri, 4 Sep 2026 12:20:46 +0200 Subject: [PATCH] Setting property during initialization of RascalShell to prevent log4j from complaining about a missing logging provider --- src/org/rascalmpl/shell/RascalShell.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/org/rascalmpl/shell/RascalShell.java b/src/org/rascalmpl/shell/RascalShell.java index 70d23b5f820..563c762c6dc 100644 --- a/src/org/rascalmpl/shell/RascalShell.java +++ b/src/org/rascalmpl/shell/RascalShell.java @@ -28,6 +28,12 @@ public class RascalShell { + static { + // Log4j is disabled here to prevent an error from being shown in every Rascal shell + // See https://github.com/usethesource/rascal/issues/2436 + System.setProperty("log4j.provider", "org.apache.logging.log4j.simple.internal.SimpleProvider"); + } + public static void main(String[] args) throws IOException { int ideServicesPort = -1; checkIfHelp(args);