Project

Profile

Help

Bug #5544

closed

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

Added by Debbie Lockett almost 2 years ago. Updated over 1 year ago.

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

100%

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 almost 2 years 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 almost 2 years ago

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

Documentation updates also committed.

Actions #3

Updated by Norm Tovey-Walsh over 1 year ago

  • Sprint/Milestone set to SaxonJS 2.5
Actions #4

Updated by Norm Tovey-Walsh over 1 year ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to SaxonJS 2.5

Fixed in SaxonJS 2.5.

Please register to edit this issue

Also available in: Atom PDF Tracking page