Project

Profile

Help

Bug #5544

closed

Using the SaxonJS.transform logLevel option sets the log level globally

Added by Debbie Lockett about 1 month ago. Updated 28 days ago.

Status:
Resolved
Priority:
Normal
Category:
API
Sprint/Milestone:
-
Start date:
2022-05-27
Due date:
% Done:

0%

Estimated time:
Applies to JS Branch:
2, Trunk
Fix Committed on JS Branch:
2, Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

Running the nodejs unit tests, I've noticed that setting the logLevel transform option sets this level globally, rather than just for that transform. This is not really what we want.

Actions #1

Updated by Debbie Lockett about 1 month ago

  • Status changed from New to In Progress

I have added logLevel to context.fixed. This is set for transforms using the value supplied for the logLevel option, or defaults to the value of SaxonJS.getLogLevel() (which has default 1, or can be set globally using SaxonJS.setLogLevel()).

Then contextLogLevel is added as a parameter to Diag.saxonPrint() so that this method can determine whether the log is to be output or not. All Diag.saxonPrint() calls for warning and processing logs should supply both "level" and "contextLogLevel" arguments, but when using Diag.saxonPrint() for temporary internal diagnostic logs these can both be omitted.

Unit test nodejs async-trans-035 demonstrates that asynchronous transforms run in parallel can have different log levels, with expected results.

Committed to saxonjs2 and main branches.

Actions #2

Updated by Debbie Lockett 28 days ago

  • Status changed from In Progress to Resolved
  • Fix Committed on JS Branch 2, Trunk added

Documentation updates also committed.

Please register to edit this issue

Also available in: Atom PDF Tracking page