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

add a flag to the CLI to enable debug mode #4535

Open
wdbaruni opened this issue Sep 26, 2024 · 0 comments
Open

add a flag to the CLI to enable debug mode #4535

wdbaruni opened this issue Sep 26, 2024 · 0 comments
Labels
request/new Request: Indicates a new request that has been submitted and awaits initial triage type/enhancement Type: New features or enhancements to existing features

Comments

@wdbaruni
Copy link
Member

We need a convenient method and common logic to enable debug mode. Today, we are mainly relying on zerolog logging level to know if we are in debug mode or not and using that in multiple places including:

  1. Deciding if our API server is in debug mode or not, which results in returning the internal error back to the clients.
    if zerolog.GlobalLevel() <= zerolog.DebugLevel {
  2. Deciding if we should print all history internal details to the console
    if zerolog.GlobalLevel() <= zerolog.DebugLevel {
  3. Also deciding on printing stacktrace when facing client errors

First, we need a more explicit way to enable debug more rather than infering from the logging level
Second, we need an easy way to expose that back to the user

@wdbaruni wdbaruni added type/enhancement Type: New features or enhancements to existing features request/new Request: Indicates a new request that has been submitted and awaits initial triage labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request/new Request: Indicates a new request that has been submitted and awaits initial triage type/enhancement Type: New features or enhancements to existing features
Projects
Status: Inbox
Development

No branches or pull requests

1 participant