Fix issue where logging will be stuck on info level (#2830)

This commit is contained in:
Devin Binnie 2023-09-15 10:21:42 -04:00 committed by GitHub
parent 128d15a283
commit 88e1fea4e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,6 +15,9 @@ export const setLoggingLevel = (level: string) => {
log.transports.file.level = level as LevelOption;
};
// Start on info by default
setLoggingLevel('info');
export const getLevel = () => log.transports.file.level as string;
export class Logger {
@ -22,9 +25,6 @@ export class Logger {
constructor(...prefixes: string[]) {
this.prefixes = this.shortenPrefixes(...prefixes);
// Start on info by default
setLoggingLevel('info');
}
withPrefix = (...prefixes: string[]) => {