add cfsetting debug="true|false"

Description

we can turn off debugging output
https://docs.lucee.org/reference/tags/setting.html#attribute-showdebugoutput

we can turn off logging for a section of a page

https://docs.lucee.org/reference/tags/processingdirective.html#attribute-executionlog

we can detect debug mode
https://docs.lucee.org/reference/functions/isdebugmode.html

but we can't disable saving a debug log, per request.

  • useful not to record logs from bots

  • long processing which may generate very large debug logs, which may sit around in memory

  • programatically decide which debug logs to save (i.e per session, or user etc)

Environment

None

relates to

Activity

Zac Spitzer 25 October 2020 at 00:23

this is easy enough to do, the code calls config all the time

pageContext.getConfig().debug()

the solution is to add a local boolean debug to pageContext, add a debug() to pageContext and change all the config.debug() to call pageContext.debug() instead

Zac Spitzer 17 September 2020 at 14:57

getPageContext().getDebugger().reset(); // clear logs

Details

Assignee

Reporter

Priority

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 15 September 2020 at 00:47
Updated 2 May 2023 at 09:59