Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogLevel redundant setup #6004

Open
mariofdezzz opened this issue Sep 17, 2024 · 0 comments
Open

LogLevel redundant setup #6004

mariofdezzz opened this issue Sep 17, 2024 · 0 comments

Comments

@mariofdezzz
Copy link

Is your feature request related to a problem? Please describe.

LogLevel setup seems confusing to me. I need to use "DEBUG" keyword two times in order to lower default level. It should be place only one time.

log.setup({
  handlers: {
    default: new log.ConsoleHandler("DEBUG"),
  },
  loggers: {
    default: {
      level: "DEBUG",
      handlers: ['default'],
    },
  },
})

// === OR ===

this.logger = new log.Logger(
  'name',
  "DEBUG",
  {
    handlers: [
      new log.ConsoleHandler("DEBUG"),
    ],
  },
)

Whats the purpose of requiring handler LogLevel too? Am I missing something?

Describe the solution you'd like

Remove LogLevel on handlers

Describe alternatives you've considered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant