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

lib/logger: Disable debug flags without debugging (fixes #4780) #5278

Merged
merged 3 commits into from
Oct 23, 2018

Conversation

imsodin
Copy link
Member

@imsodin imsodin commented Oct 18, 2018

Purpose

#4780

Testing

manual

l.debug[facility] = enabled
l.mut.Unlock()
l.SetFlags(DebugFlags)
if enabled {
Copy link
Member

@AudriusButkevicius AudriusButkevicius Oct 18, 2018

Choose a reason for hiding this comment

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

l.debug could be map[string]struct{} where entry being there implies its on, entry not being there implies its off. Then enabled or not is just a len() over the map.

Also, I'd want to add shortfile to default log flags, @calmh?

Copy link
Member

Choose a reason for hiding this comment

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

Why? I think that’s mostly noise to most people, no?

@imsodin imsodin merged commit 406bedf into syncthing:master Oct 23, 2018
@imsodin imsodin deleted the disableDebug branch October 23, 2018 13:17
@calmh calmh added this to the v0.14.53 milestone Oct 31, 2018
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Oct 24, 2019
@syncthing syncthing locked and limited conversation to collaborators Oct 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants