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

Added log enablers/disablers for all logger types on $logProvider #8832

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thebigredgeek
Copy link
Contributor

This is a pretty simple update. It extends the log provider to allow toggling for each log output type, instead of just for $log.debug.

@btford
Copy link
Contributor

btford commented Sep 3, 2014

Can you squash your commits and follow the commit message guidelines?

@btford btford added this to the Backlog milestone Sep 3, 2014
@thebigredgeek
Copy link
Contributor Author

Also, @btford , this feature sorta collides with this PR #8303 I really disagree with the premise of this PR, but you guys should probably take a look. To me, string level logging configuration should probably be handled by a custom provider and not in ngCore.

@thebigredgeek thebigredgeek force-pushed the feat/logProviderMultipleEnablers branch from 160715c to 9ab91b0 Compare September 4, 2014 18:10
@thebigredgeek
Copy link
Contributor Author

Regarding squashing, I unfortunately merged in changes from master and cannot remember how to cherry pick and squash two commits together since they are no longer one right after the other. Can you advise? It has been a while (blush)

@btford
Copy link
Contributor

btford commented Sep 4, 2014

The easiest way to squash is with an interactive rebase.

@thebigredgeek
Copy link
Contributor Author

ya I tried that, but I get a list of about 1000 commits :( I think it is because I merged. ~2 doesn't seem to work at all

@thebigredgeek
Copy link
Contributor Author

@btford can you handle this for me? lol. I may have SOL'd myself with this

@thebigredgeek thebigredgeek force-pushed the feat/logProviderMultipleEnablers branch from 9ab91b0 to 1a7fc31 Compare September 15, 2014 16:59
@thebigredgeek
Copy link
Contributor Author

K, this should be ready. I went ahead and just redid the work to avoid combing through hundreds of commits for a squash. Should be good to go now. Thanks @btford


return function() {
if (log) {
Copy link
Contributor

Choose a reason for hiding this comment

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

there's no way to toggle this setting after the config phase (without hacks).

A smaller solution would be log: log ? consoleLog('log') : noop

However this still looks really big and maybe not that useful. Something closer to karma's logLevels might make more sense

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, interesting. This is literally the same code used for the existing debugEnabled function. Do we want to change how that works as well?

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

Successfully merging this pull request may close these issues.

4 participants