Skip to content

Commit

Permalink
LDEV-2506 dump debug logs to console
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Dec 17, 2024
1 parent e4af930 commit 25254df
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/tickets/LDEV5206.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ component extends = "org.lucee.cfml.test.LuceeTestCase" {
local.result = _InternalRequest(
template : "#uri#/ldev5206.cfm"
);
systemOutput("Logging debugEntries to console", true);
systemOutput(getDebugEntry(), true);
systemOutput("finished", true);
});

});
Expand All @@ -38,12 +41,20 @@ component extends = "org.lucee.cfml.test.LuceeTestCase" {
admin action="UpdateExecutionLog" type="server" password="#request.SERVERADMINPASSWORD#"
class="#arguments.class#" enabled= true
arguments=arguments.args;
admin action="updateDebug" type="server" password="#request.SERVERADMINPASSWORD#" debug="true";
admin action="updateDebug" type="server" password="#request.SERVERADMINPASSWORD#" debug="true" template="true"; // template needs to be enabled to produce debug logs
}
private function disableExecutionLog(class="lucee.runtime.engine.ConsoleExecutionLog"){
admin action="updateDebug" type="server" password="#request.SERVERADMINPASSWORD#" debug="false";

admin action="UpdateExecutionLog" type="server" password="#request.SERVERADMINPASSWORD#" arguments={}
class="#arguments.class#" enabled=false;
admin action="PurgeDebugPool" type="server" password="#request.SERVERADMINPASSWORD#";
}

private function getDebugEntry(){
var logs = [];
admin action="getDebugEntry" type="server" password="#request.SERVERADMINPASSWORD#" returnVariable="logs";
return logs;
}

}

0 comments on commit 25254df

Please sign in to comment.