[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Managing debug logging in complex transforms: what

Subject: Re: Managing debug logging in complex transforms: what do people do?
From: davep <davep@xxxxxxxxxxxxx>
Date: Tue, 25 Mar 2014 09:18:52 +0000
Re:  Managing debug logging in complex transforms: what
On Mon, 24 Mar 2014 12:31:07 -0500
Eliot Kimber <ekimber@xxxxxxxxxxxx> wrote:

> Then I started using a runtime parameter to turn debugging on or off
> globally and using IF checks to output my messages. But that results
> in a lot of messages when you've got a lot of debug messages, most of
> which are not relevant to your current problem, so back to commenting
> things out or disabling the IF check (e.g., test="false() and
> $doDebug").
>
> Lately I've been trying the technique of using a tunnel parameter to
> communicate the debug state to each template or function, which lets
> me selectively turn on debugging within a given code path, e.g.:
>


snip

>
> Because you can shadow a parameter within a template, you can create a
> doDebug variable within a template to turn debugging on or off and
> that setting will propagate to the descendant templates.
>
> This approach is working well to make it easier for me to control my
> debugging dynamically and more easily focus my messaging. But it adds
> some overhead to the code in that you need the debug parameter and
> with-param everywhere, which isn't that big of a deal to add but
> still.
>
> My question: is there a better way to do this? Am I overlooking some
> feature of XSLT 2 (or 3) that would make managing debugging messages
> easier? Should I step up to a more complete messaging framework that
> mirrors e.g., log4j?


Nominal variant on that Eliot.
Set your debug variable to a 'level', I use 1..10
and adjust your volume accordingly.
  Higher number, more output.

HTH DaveP


> bbbbb
> Eliot Kimber, Owner
> Contrext, LLC
> http://contrext.com
>



--

regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.