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 'verbose' parameter to @DebugLog which en-/disables the logging #82

Closed
tschob opened this issue May 13, 2015 · 5 comments
Closed

Comments

@tschob
Copy link

tschob commented May 13, 2015

I would like to be able to give @debuglog a parameter which en-/disables the logging. I don't wan't to see all logs everytime. So eg. if I'm interested in the api logs I would adjust my verbose constant to see them and if I'm interested in other parts I can disable them (to don't be distracted).

@JakeWharton
Copy link
Owner

Couldn't you just comment out the annotation to the same effect?

@tschob
Copy link
Author

tschob commented May 14, 2015

It would have the same effect, of course. But it's not my understanding of clean code and working efficiency to (un-)comment multiple lines of code instead of using one constant for it.

That's why there exists Hugo, isn't it? At least it would have the same effect to do a manually log in each method too. But it's not as clean and useful as the @debuglog approach.

@JakeWharton
Copy link
Owner

I think I'll move the Hugo class into the public API and give it some options including a log hook for #60

@JakeWharton
Copy link
Owner

And, obviously, a setting for this

@JakeWharton
Copy link
Owner

Hugo.setEnabled just merged.

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

No branches or pull requests

2 participants