fix (backend): correctly fallback maxLogLevel to info
This commit is contained in:
parent
f80ee9f36d
commit
aae505ad68
1 changed files with 6 additions and 3 deletions
|
@ -47,8 +47,8 @@ export default class Logger {
|
|||
return logger;
|
||||
}
|
||||
|
||||
private showThisLog(logLevel: Level, configLevel: string) {
|
||||
switch (configLevel) {
|
||||
private showThisLog(logLevel: Level, configMaxLevel: string) {
|
||||
switch (configMaxLevel) {
|
||||
case "error":
|
||||
return ["error"].includes(logLevel);
|
||||
case "warning":
|
||||
|
@ -75,7 +75,10 @@ export default class Logger {
|
|||
if (
|
||||
(config.maxLogLevel != null &&
|
||||
!this.showThisLog(level, config.maxLogLevel)) ||
|
||||
(config.logLevel != null && !config.logLevel.includes(level))
|
||||
(config.logLevel != null && !config.logLevel.includes(level)) ||
|
||||
(config.maxLogLevel == null &&
|
||||
config.logLevel == null &&
|
||||
!this.showThisLog(level, "info"))
|
||||
)
|
||||
return;
|
||||
if (!this.store) store = false;
|
||||
|
|
Loading…
Reference in a new issue