timjroberts / cucumber-js-tsflow

Provides 'specflow' like bindings for Cucumber.js in TypeScript 1.7+.
MIT License
133 stars 34 forks source link

Use non-default logger category to avoid changing default category's logging level #88

Closed AlexeyRokhin closed 3 years ago

AlexeyRokhin commented 3 years ago

Getting logger without category means that logger with default category is returned. When level for such logger is set, it means that the level for the whole category gets changed: https://github.com/log4js-node/log4js-node/blob/master/lib/logger.js#L56 So, if you don't have a category-specific logger configuration, then log level for all loggers gets changed (bacause they use default category's configuration).

In our case we specify categories for our loggers but we don't use category-specific logger configurations (so, we use our default category's configuration which allows trace level). Many of our loggers use trace level to output some specific information and those messages are not visible because tsflow sets debug level for default configuration.

Another change in this PR is the usage of double quotes instead of single quotes in test script to allow to run the script on Windows.