@itwin/core-i18n 4.5.0-dev.27 → 4.5.0-dev.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -1
- package/lib/cjs/ITwinLocalization.js.map +1 -1
- package/lib/cjs/core-i18n.js.map +1 -1
- package/lib/cjs/test/ITwinLocalization.test.js.map +1 -1
- package/lib/cjs/test/webpack/bundled-tests.instrumented.js +154 -147
- package/lib/cjs/test/webpack/bundled-tests.instrumented.js.map +1 -1
- package/lib/cjs/test/webpack/bundled-tests.js +12 -5
- package/lib/cjs/test/webpack/bundled-tests.js.map +1 -1
- package/lib/esm/ITwinLocalization.js.map +1 -1
- package/lib/esm/core-i18n.js.map +1 -1
- package/lib/esm/test/ITwinLocalization.test.js.map +1 -1
- package/package.json +6 -6
|
@@ -19301,6 +19301,14 @@ var LogLevel;
|
|
|
19301
19301
|
* @public
|
|
19302
19302
|
*/
|
|
19303
19303
|
class Logger {
|
|
19304
|
+
/** @internal */
|
|
19305
|
+
static get categoryFilter() {
|
|
19306
|
+
return { ...Logger._categoryFilter };
|
|
19307
|
+
}
|
|
19308
|
+
/** @internal */
|
|
19309
|
+
static get minLevel() {
|
|
19310
|
+
return Logger._minLevel;
|
|
19311
|
+
}
|
|
19304
19312
|
/** Initialize the logger streams. Should be called at application initialization time. */
|
|
19305
19313
|
static initialize(logError, logWarning, logInfo, logTrace) {
|
|
19306
19314
|
Logger._logError = logError;
|
|
@@ -19340,7 +19348,7 @@ class Logger {
|
|
|
19340
19348
|
* specified category should be displayed.
|
|
19341
19349
|
*/
|
|
19342
19350
|
static setLevel(category, minLevel) {
|
|
19343
|
-
Logger._categoryFilter
|
|
19351
|
+
Logger._categoryFilter[category] = minLevel;
|
|
19344
19352
|
this.logLevelChangedFn?.();
|
|
19345
19353
|
}
|
|
19346
19354
|
/** Interpret a string as the name of a LogLevel */
|
|
@@ -19397,7 +19405,7 @@ class Logger {
|
|
|
19397
19405
|
/** Get the minimum logging level for the specified category. */
|
|
19398
19406
|
static getLevel(category) {
|
|
19399
19407
|
// Prefer the level set for this category specifically
|
|
19400
|
-
const minLevelForThisCategory = Logger._categoryFilter
|
|
19408
|
+
const minLevelForThisCategory = Logger._categoryFilter[category];
|
|
19401
19409
|
if (minLevelForThisCategory !== undefined)
|
|
19402
19410
|
return minLevelForThisCategory;
|
|
19403
19411
|
// Fall back on the level set for the parent of this category.
|
|
@@ -19416,7 +19424,7 @@ class Logger {
|
|
|
19416
19424
|
/** Turns off all category level filters previously defined with [[Logger.setLevel]].
|
|
19417
19425
|
*/
|
|
19418
19426
|
static turnOffCategories() {
|
|
19419
|
-
Logger._categoryFilter
|
|
19427
|
+
Logger._categoryFilter = {};
|
|
19420
19428
|
}
|
|
19421
19429
|
/** Check if messages in the specified category should be displayed at this level of severity. */
|
|
19422
19430
|
static isEnabled(category, level) {
|
|
@@ -19474,8 +19482,7 @@ class Logger {
|
|
|
19474
19482
|
Logger._logTrace(category, message, metaData);
|
|
19475
19483
|
}
|
|
19476
19484
|
}
|
|
19477
|
-
Logger._categoryFilter =
|
|
19478
|
-
Logger._minLevel = undefined; // do not change the name of this member, it is referenced directly from node addon
|
|
19485
|
+
Logger._categoryFilter = {};
|
|
19479
19486
|
/** Should the call stack be included when an exception is logged? */
|
|
19480
19487
|
Logger.logExceptionCallstacks = false;
|
|
19481
19488
|
/** All static metadata is combined with per-call metadata and stringified in every log message.
|