Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

feat($logProvider): add additional control over what gets logged #10585

Closed
wants to merge 1 commit into from
Closed

feat($logProvider): add additional control over what gets logged #10585

wants to merge 1 commit into from

Conversation

lbm
Copy link

@lbm lbm commented Dec 27, 2014

A simple addition that lets developers have greater control over what does and doesn't get logged. With this change you can disable log, info, warn and error messages, similar to how debug logs could be disable with $logProvider.debugEnabled in the past.

Closes #10560

@lgalfaso
Copy link
Contributor

Hi, thanks for the PR. Anyhow, this is not the right way to make
logging configurable. LogProvider should expose a mechanism to set the
log level, and to know if a specific level is enabled. Just to copy
and paste the mistake that we have for the debug level is not the
right way.

@lbm
Copy link
Author

lbm commented Dec 27, 2014

You mean to remove the existing [type]Enabled methods and instead have a unified 'log level', where the level given dictates what type of messages are logged (verbose, warn, etc.)?

@lgalfaso
Copy link
Contributor

I mean that we should keep the existing method to handle just debug
for compatibility reasons, but deprecate it. Then follow the API of an
existing popular library, eg loglevel.

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

Successfully merging this pull request may close these issues.

Log levels
5 participants