From 49f0072a930ae34d3835d64b021808faeb1b3739 Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Tue, 17 Feb 2026 09:23:15 +1100 Subject: [PATCH] LDEV-6113 restore executionLogEnabled setting lost during ConfigImpl merge https://luceeserver.atlassian.net/browse/LDEV-6113 --- .../runtime/config/ConfigServerImpl.java | 25 +++++++++++++++++-- .../main/java/lucee/runtime/tag/Admin.java | 2 +- test/tickets/LDEV5206.cfc | 4 +-- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/lucee/runtime/config/ConfigServerImpl.java b/core/src/main/java/lucee/runtime/config/ConfigServerImpl.java index 1bd146769fe..35ac02f0ff7 100644 --- a/core/src/main/java/lucee/runtime/config/ConfigServerImpl.java +++ b/core/src/main/java/lucee/runtime/config/ConfigServerImpl.java @@ -873,6 +873,7 @@ public final class ConfigServerImpl implements ConfigServer, ConfigPro { + "registered breakpoints and the programmatic breakpoint() BIF. " + "Unlike traditional JDWP debugging, this event-driven approach incurs " + "virtually no performance penalty when no breakpoints are hit, " + "eliminating the need for slow bytecode rewriting."); private Boolean dapBreakpoint; + private Boolean executionLogEnabled; private static ImportDefintion DEFAULT_IMPORT_DEFINITION = new ImportDefintionImpl(Constants.DEFAULT_PACKAGE, "*"); private static Prop metaComponentDefaultImport = Prop.str().keys("componentAutoImport", "componentDefaultImport").defaultValue(DEFAULT_IMPORT_DEFINITION.toString()) @@ -6532,9 +6533,29 @@ public ConfigServerImpl resetDapBreakpoint() { } @Override - @Deprecated public boolean getExecutionLogEnabled() { - return getDapBreakpoint(); + if (getDapBreakpoint()) return true; + + if (executionLogEnabled == null) { + synchronized (SystemUtil.createToken("config", "getExecutionLogEnabled")) { + if (executionLogEnabled == null) { + Struct sct = ConfigUtil.getAsStruct("executionLog", root); + executionLogEnabled = Caster.toBoolean(ConfigFactoryImpl.getAttr(this, sct, "enabled"), Boolean.FALSE); + } + } + } + return executionLogEnabled; + } + + public ConfigServerImpl resetExecutionLogEnabled() { + if (executionLogEnabled != null) { + synchronized (SystemUtil.createToken("config", "getExecutionLogEnabled")) { + if (executionLogEnabled != null) { + executionLogEnabled = null; + } + } + } + return this; } @Override diff --git a/core/src/main/java/lucee/runtime/tag/Admin.java b/core/src/main/java/lucee/runtime/tag/Admin.java index 91459d743e9..dbb09f38929 100755 --- a/core/src/main/java/lucee/runtime/tag/Admin.java +++ b/core/src/main/java/lucee/runtime/tag/Admin.java @@ -4345,7 +4345,7 @@ private void doUpdateExecutionLog() throws PageException { lucee.runtime.db.ClassDefinition cd = ClassDefinitionImpl.toClassDefinitionImpl(attributes, null, true, config.getIdentification()); admin.updateExecutionLog(cd, getStruct("admin", "updateExecutionLog", "arguments"), getBool("admin", "updateExecutionLog", "enabled")); store(); - ConfigUtil.getConfigServerImpl(config).resetDapBreakpoint().resetDapSecret().resetExecutionLogFactory(); + ConfigUtil.getConfigServerImpl(config).resetExecutionLogEnabled().resetExecutionLogFactory(); adminSync.broadcast(attributes, config); } diff --git a/test/tickets/LDEV5206.cfc b/test/tickets/LDEV5206.cfc index 8bae62cf917..1ca7bdd1e6a 100644 --- a/test/tickets/LDEV5206.cfc +++ b/test/tickets/LDEV5206.cfc @@ -27,7 +27,7 @@ component extends = "org.lucee.cfml.test.LuceeTestCase" { }); describe( "LDEV-5206 DebugExecutionLog", function(){ - xit( "test DebugExecutionLog - cfm ", function(){ + it( "test DebugExecutionLog - cfm ", function(){ var logs = getDebugLogs(); expect( len( logs ) ).toBe( 1 ); var log = logs[ 1 ]; @@ -66,7 +66,7 @@ component extends = "org.lucee.cfml.test.LuceeTestCase" { expect( pageParts[ key ].snippet ).toBe( "cfc.doSleep()" ); // LDEV-5207 only returns "cfc" }); - xit( "test DebugExecutionLog - cfc parts ", function(){ + it( "test DebugExecutionLog - cfc parts ", function(){ var logs = getDebugLogs(); expect( len( logs ) ).toBe( 1 ); var log = logs[ 1 ];