Ticket #350 (closed enhancement: fixed)

Opened 17 years ago

Last modified 16 years ago

Disable Model-Glue debug information for certain events

Reported by: michael@… Owned by:
Priority: high Milestone: 3.1 Maintenance Beta
Version: 3.0.178 Severity: enhancement
Keywords: Debug,modelglue.xml Cc:

Description

It would be easier to disable the debug output for certain events. Like when I have a event which only generates a XML feed, I would like to disable debug output for that event (set in the ModelGlue?.xml file).

For instance something like:

<event-handler name="galleryxml" debug="false">

<broadcasts>

<message name="getGalleryXML" />

</broadcasts> <results /> <views>

<include name="body" template="feed.xml.cfm" />

</views>

</event-handler>

This would result in a XML feed without the debug output under it as this would break (in my case) Flex XML sources for certain components when I'm in debug mode. And sometimes you need to debug the page, but not feeds like that.

Change History

Changed 16 years ago by cfgrok

  • milestone changed from Feature Requests to 3.2

Changed 16 years ago by DanWilson

  • status changed from new to closed
  • resolution set to fixed

Fixed in SVN commit 210

Well now you can simply decorate your event-handler or event-type with disableDebug=true and Model-Glue debugging will vanish. In both code examples below, the Model Glue debugging will shut itself off for that request. Thus, your structured data won't be affected by Model-Glue debugging.

Examples:

<event-handler name="eventHandlerWithDisabledDebug" disableDebug="true">

Or using Event Types:

<event-type name="hasNoDebug" disableDebug="true">

<before> </before>

</event-type>

<event-handler name="eventHandlerWithEventTypeOfDisabledDebug" type="hasNoDebug">

Changed 16 years ago by DanWilson

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 16 years ago by DanWilson

  • status changed from reopened to closed
  • resolution set to fixed
  • milestone changed from 3.2 to 3.1.x-next-patch

We've changed our minds on the best way to do this. Rather than adding a new attribute to XML, you can now just simply broadcast a message which will disable the debugging.

You may now add this message anywhere messages are legal XML.

<message name="modelglue.disableModelGlueDebugging" />

Note: See TracTickets for help on using tickets.