From 25254df3502c1f9763df41c898f2cdea2e43f7fc Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Tue, 17 Dec 2024 17:42:28 +0100 Subject: [PATCH] LDEV-2506 dump debug logs to console --- test/tickets/LDEV5206.cfc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/tickets/LDEV5206.cfc b/test/tickets/LDEV5206.cfc index d6876d2898..03eaee4b51 100644 --- a/test/tickets/LDEV5206.cfc +++ b/test/tickets/LDEV5206.cfc @@ -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); }); }); @@ -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; + } + }