Anonymous_User Absent Member.
Absent Member.
199 views

Determine current trace level from ECMAScript and/or XSLT


Is there any way to determine the current trace level from ECMAScript or
XSLT? I was hoping to be able to control the level of debug messages
output by these sources based upon the currently set trace level (kind
of like do-trace-message for DirXML script).

I'm sure I can read the 'default' trace level from the DirXML-TraceLevel
attribute on the driver, but this doesn't necessarily reflect the
current trace level. Any ideas?


--
ChrisReeves
------------------------------------------------------------------------
ChrisReeves's Profile: https://forums.netiq.com/member.php?userid=346
View this thread: https://forums.netiq.com/showthread.php?t=48513

Labels (1)
0 Likes
6 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Determine current trace level from ECMAScript and/or XSLT


I was under the assumption the DirXML-TraceLevel attribute on the driver
actually did reflect the current trace level.
Isn't this one of those rare attributes that take immediate effect and
do not demand a restart of driver.


--
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: https://forums.netiq.com/member.php?userid=159
View this thread: https://forums.netiq.com/showthread.php?t=48513

0 Likes
Knowledge Partner
Knowledge Partner

Re: Determine current trace level from ECMAScript and/or XSLT

On 8/30/2013 5:14 AM, joakim ganse wrote:
>
> I was under the assumption the DirXML-TraceLevel attribute on the driver
> actually did reflect the current trace level.
> Isn't this one of those rare attributes that take immediate effect and
> do not demand a restart of driver.


Yes it does. But there is a possibility of a null value (absent reallY)
in which case, the effective level is inherited from the Driver Set.

So at one level, as simple as you suggest. There is one extra level of
complexity that may or may not be very common.

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Determine current trace level from ECMAScript and/or XSLT

Geoffrey Carman <geoffreycarmanNOSPAM@NOSPAMgmail.com> wrote:
> On 8/30/2013 5:14 AM, joakim ganse wrote:
>>
>> I was under the assumption the DirXML-TraceLevel attribute on the driver
>> actually did reflect the current trace level.
>> Isn't this one of those rare attributes that take immediate effect and
>> do not demand a restart of driver.

>
> Yes it does. But there is a possibility of a null value (absent reallY)
> in which case, the effective level is inherited from the Driver Set.


I thought that the absent state was mapped to a integer of -1 (just to keep
things consistent)

--
NetIQ Knowledge Partner http://forums.netiq.com
Please post questions in the forums.
No support is provided via email.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Determine current trace level from ECMAScript and/or XSLT

On 8/30/2013 9:41 AM, Alex McHugh wrote:
> Geoffrey Carman <geoffreycarmanNOSPAM@NOSPAMgmail.com> wrote:
>> On 8/30/2013 5:14 AM, joakim ganse wrote:
>>>
>>> I was under the assumption the DirXML-TraceLevel attribute on the driver
>>> actually did reflect the current trace level.
>>> Isn't this one of those rare attributes that take immediate effect and
>>> do not demand a restart of driver.

>>
>> Yes it does. But there is a possibility of a null value (absent reallY)
>> in which case, the effective level is inherited from the Driver Set.

>
> I thought that the absent state was mapped to a integer of -1 (just to keep
> things consistent)


But is the raw attribute, written as absent, or -1?


0 Likes
Knowledge Partner
Knowledge Partner

Re: Determine current trace level from ECMAScript and/or XSLT

ChrisReeves wrote:

> I'm sure I can read the 'default' trace level from the DirXML-TraceLevel
> attribute on the driver, but this doesn't necessarily reflect the
> current trace level. Any ideas?


This is the current active trace level the driver runs with. What would a
default trace level be?
______________________________________________
https://www.is4it.de/identity-access-management
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Determine current trace level from ECMAScript and/or XSLT

ChrisReeves wrote at 30.08.2013 10:54:04 :

>
> Is there any way to determine the current trace level from ECMAScript
> or XSLT? I was hoping to be able to control the level of debug
> messages output by these sources based upon the currently set trace
> level (kind of like do-trace-message for DirXML script).
>
> I'm sure I can read the 'default' trace level from the
> DirXML-TraceLevel attribute on the driver, but this doesn't
> necessarily reflect the current trace level. Any ideas?



I believe you should be able to get at this via ECMAScript

There is a tid about tracing via ECMAScript using the
com.novell.nds.dirxml.driver.Trace class

https://www.netiq.com/support/kb/doc.php?id=7000888

This class has a getTraceLevel() method.

So maybe something like:


var tracer = new
Packages.com.novell.nds.dirxml.driver.Trace("ECMAScript");
function GetTraceLevel()
{
return tracer.getTraceLevel()
}

(didn't work in simulator, but you can use this as a starting point)


--
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.