atom feed5 messages in com.marklogic.developer.generalRe: [MarkLogic Dev General] Specify l...
FromSent OnAttachments
David SewellFeb 3, 2012 11:28 am 
Danny SokolskyFeb 3, 2012 11:36 am 
David SewellFeb 3, 2012 11:49 am 
Danny SokolskyFeb 3, 2012 12:45 pm 
David LeeFeb 4, 2012 2:45 pm 
Subject:Re: [MarkLogic Dev General] Specify log level for call to <xsl:message>?
From:Danny Sokolsky (Dann@marklogic.com)
Date:Feb 3, 2012 12:45:44 pm
List:com.marklogic.developer.general

Yes, that is an example of what I mean. You can also add that to the select for
the xsl:message, or in any other instruction (xsl:copy-of, for example). I
agree it feels a little awkward, but I think that is just the XSLT way.

I think the problem with extending xsl:message to do that is that it has some
semantics defined that do not completely map to what xdmp:log does, but it might
be worth looking into anyway.

-Danny

-----Original Message----- From: gene@developer.marklogic.com
[mailto:gene@developer.marklogic.com] On Behalf Of David Sewell Sent: Friday, February 03, 2012 11:50 AM To: General MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Specify log level for call to
<xsl:message>?

You mean like

<xsl:variable name="dummy" select="xdmp:log('MESSAGE!', 'critical')"/>

? That works fine, only it's a little inelegant IMO to have to create a dummy variable for this purpose. On the other hand, I've certainly done the same thing on the XQuery side often (i.e. "let $dummy := xdmp:log('something')").

But it's a good workaround.

On Fri, 3 Feb 2012, Danny Sokolsky wrote:

Hi David,

Why not just call xdmp:log from within your xslt instead?

-----Original Message----- From: gene@developer.marklogic.com
[mailto:gene@developer.marklogic.com] On Behalf Of David Sewell Sent: Friday, February 03, 2012 11:29 AM To: General Mark Logic Developer Discussion Subject: [MarkLogic Dev General] Specify log level for call to <xsl:message>?

xdmp:log() takes as an optional argument a string specifying the log level (like "info", "notice", etc.).

When processing XSLT, MarkLogic writes the value of <xsl:message> to the logfile, using the default level "info". That's a problem if someone wants to change server configuration to set the minimum log level to a higher priority (to avoid the zillions of messages about database merges, etc.)

Is there any way to change the log level of <xsl:message> output?

If not, maybe grounds for a feature request, for an extension attribute on <xsl:message> to accomplish this?