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

[Event Hubs] Investigate how current logging mechanism can fit into logging levels #2662

Closed
ramya-rao-a opened this issue May 2, 2019 · 1 comment
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Milestone

Comments

@ramya-rao-a
Copy link
Contributor

Refer to General Guidelines on Logging

This issue is to investigate how the way we do logging in Event Hubs can fit into what is being described in the guidelines

@ramya-rao-a
Copy link
Contributor Author

Current state:

  • We use the debug package to support logging at various levels of our code
  • The log.ts file lists all the different levels we support today in Event Hubs library
  • The below libraries that get used in Event Hubs have their own log levels
    • amqp-common
    • rhea-promise
    • rhea
  • The way to enable/disable/control levels for logs are by using the environment variable DEBUG

Proposal:

We can make use of the enable() and disable methods in the debug module to enable logs at various levels dynamically

Log levels generally are

  • None
  • Error
  • Warning
  • Info
  • Verbose

Net work:

  • Map these levels to the right combination of debug modules so that we can enable the right ones.
  • Review and update all logging to match the above log levels
  • Update ClientOptionsBase to take in a new option logLevel. The constructor for EventHubsClient will read this and use debug.enable() appropriately
  • The new options bag that we plan to add as part of [Event Hubs] Review retry logic against the guidelines #2661 (comment) to all the user facing operations is also updated to include logLevel. Each operation will read this and use debug.enable() appropriately. This overrides the value set when creating the EventHubClient

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Projects
None yet
Development

No branches or pull requests

1 participant