From be8d64fa48eba7452fa0888aedf140dd47e3b793 Mon Sep 17 00:00:00 2001 From: Will Ezell Date: Wed, 20 Mar 2024 18:29:31 -0400 Subject: [PATCH] security(logging) can be overriden by env var ref: #27910 --- dotCMS/src/main/java/com/dotmarketing/util/RuntimeUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dotCMS/src/main/java/com/dotmarketing/util/RuntimeUtils.java b/dotCMS/src/main/java/com/dotmarketing/util/RuntimeUtils.java index eb944a6c866d..6e3c4da6f11d 100644 --- a/dotCMS/src/main/java/com/dotmarketing/util/RuntimeUtils.java +++ b/dotCMS/src/main/java/com/dotmarketing/util/RuntimeUtils.java @@ -29,7 +29,9 @@ public class RuntimeUtils { - private static final Lazy ENABLE_LOGGING = Lazy.of(() -> Boolean.parseBoolean(System.getProperty("dotcms.runtimeutils.enablelogging", "false"))); + private static final Lazy ENABLE_LOGGING = Lazy.of(() -> { + return Try.of(()->Boolean.parseBoolean(System.getenv("DOT_RUNTIME_ENABLE_LOGGING"))).getOrElse(false); + }); private static void logInfo(String message) {