-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
devmapper: initialize log levels #10193
Conversation
oh go on, dare you to tell me that these magic settings are documented in your readme. :D |
Which magic settings? Setting DEBUG? That is a known thing and when you pass the |
7441961
to
1794417
Compare
made the levels more clear. PTAL. |
@@ -939,6 +941,11 @@ func (devices *DeviceSet) closeTransaction() error { | |||
} | |||
|
|||
func (devices *DeviceSet) initDevmapper(doInit bool) error { | |||
if len(os.Getenv("DEBUG")) > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually everywhere in our code we using os.Getenv("DEBUG") != "
:)
1794417
to
9e287cb
Compare
@LK4D4 changed. PTAL. |
|
||
// definitions from lvm2 lib/log/log.h | ||
const ( | ||
_ = iota |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iota starts at 0, which we don't need. But this shows me that we need it to start at 2 and go to 7. I'll make this clearer.
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Signed-off-by: Vincent Batts <vbatts@redhat.com>
9e287cb
to
0c8be9d
Compare
|
||
// definitions from lvm2 lib/log/log.h | ||
const ( | ||
LogLevelFatal = 2 + iota // _LOG_FATAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LK4D4 Is this clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, also this is different logic as I see :) So we fixed bug!
LGTM |
1 similar comment
LGTM |
devmapper: initialize log levels
I'll say, the importance of this change is that the skipping debug level log did the opposite of what we would want. In that when docker is run in debug mode, then no logging would occur.
Additionally, there are tell-tale output from device-mapper on WARN level 4, so this makes that the default level.
Signed-off-by: Vincent Batts vbatts@redhat.com