Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions core/src/main/java/lucee/runtime/config/ConfigServerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> metaComponentDefaultImport = Prop.str().keys("componentAutoImport", "componentDefaultImport").defaultValue(DEFAULT_IMPORT_DEFINITION.toString())
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/lucee/runtime/tag/Admin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions test/tickets/LDEV5206.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down Expand Up @@ -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 ];
Expand Down