@crimsonsunset/jsg-logger 1.0.8 → 1.0.10
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/config/config-manager.js +1 -1
- package/index.js +9 -3
- package/package.json +1 -1
package/config/config-manager.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements smart level resolution and file override system
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import defaultConfig from './default-config.json';
|
|
7
|
+
import defaultConfig from './default-config.json' with { type: 'json' };
|
|
8
8
|
import {COMPONENT_SCHEME, LEVEL_SCHEME} from './component-schemes.js';
|
|
9
9
|
|
|
10
10
|
export class ConfigManager {
|
package/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import pino from 'pino';
|
|
7
7
|
import {configManager} from './config/config-manager.js';
|
|
8
8
|
import {COMPONENT_SCHEME} from './config/component-schemes.js';
|
|
9
|
-
import defaultConfig from './config/default-config.json';
|
|
9
|
+
import defaultConfig from './config/default-config.json' with { type: 'json' };
|
|
10
10
|
import {getEnvironment, isBrowser, isCLI} from './utils/environment-detector.js';
|
|
11
11
|
import {createBrowserFormatter} from './formatters/browser-formatter.js';
|
|
12
12
|
import {createCLIFormatter} from './formatters/cli-formatter.js';
|
|
@@ -219,12 +219,18 @@ class CACPLogger {
|
|
|
219
219
|
listComponents: () => Object.keys(this.loggers),
|
|
220
220
|
enableDebugMode: () => {
|
|
221
221
|
Object.keys(this.loggers).forEach(component => {
|
|
222
|
-
this.
|
|
222
|
+
if (this.loggers[component]) {
|
|
223
|
+
this.loggers[component].level = 'debug';
|
|
224
|
+
this.loggers[component]._effectiveLevel = 'debug';
|
|
225
|
+
}
|
|
223
226
|
});
|
|
224
227
|
},
|
|
225
228
|
enableTraceMode: () => {
|
|
226
229
|
Object.keys(this.loggers).forEach(component => {
|
|
227
|
-
this.
|
|
230
|
+
if (this.loggers[component]) {
|
|
231
|
+
this.loggers[component].level = 'trace';
|
|
232
|
+
this.loggers[component]._effectiveLevel = 'trace';
|
|
233
|
+
}
|
|
228
234
|
});
|
|
229
235
|
},
|
|
230
236
|
|
package/package.json
CHANGED