Skip to content

Conversation

hitarth-gg
Copy link
Collaborator

Description of Change

  • Added Logger class with quiet and ignoreLogs options.
  • Updated devtron.install(options) to configure the logger automatically, allowing users to suppress specific Devtron logs from polluting the terminal.
  • Updated docs with usage example and options table.

Usage:

await devtron.install({ quiet: true }); // ignores all logs except `error`
await devtron.install({
  ignoreLogs: ['info'] // ignores only `info`
})

@hitarth-gg hitarth-gg marked this pull request as ready for review August 25, 2025 18:57
Copy link
Member

@erickzhao erickzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API-wise, I think a logLevel option would make more sense and cover all our bases.

Options would be debug, info, warn, error, or none, where enabling a less important log level would make all higher-priority ones.

It feels more ergonomic that way since you don't usually want to ignore non-contiguous log levels.

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

Successfully merging this pull request may close these issues.

2 participants