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

devmapper: initialize log levels #10193

Merged
merged 2 commits into from
Jan 20, 2015
Merged

devmapper: initialize log levels #10193

merged 2 commits into from
Jan 20, 2015

Conversation

vbatts
Copy link
Contributor

@vbatts vbatts commented Jan 19, 2015

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

@SvenDowideit
Copy link
Contributor

oh go on, dare you to tell me that these magic settings are documented in your readme. :D

@vbatts
Copy link
Contributor Author

vbatts commented Jan 20, 2015

Which magic settings? Setting DEBUG? That is a known thing and when you pass the -D flag to client or deamon it sets the DEBUG env as well.

@vbatts
Copy link
Contributor Author

vbatts commented Jan 20, 2015

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 {
Copy link
Contributor

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") != " :)

@vbatts
Copy link
Contributor Author

vbatts commented Jan 20, 2015

@LK4D4 changed. PTAL.


// definitions from lvm2 lib/log/log.h
const (
_ = iota
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this?

Copy link
Contributor Author

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>

// definitions from lvm2 lib/log/log.h
const (
LogLevelFatal = 2 + iota // _LOG_FATAL
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@LK4D4 Is this clearer?

Copy link
Contributor

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!

@LK4D4
Copy link
Contributor

LK4D4 commented Jan 20, 2015

LGTM

1 similar comment
@jessfraz
Copy link
Contributor

LGTM

vbatts added a commit that referenced this pull request Jan 20, 2015
devmapper: initialize log levels
@vbatts vbatts merged commit fa7af79 into moby:master Jan 20, 2015
@vbatts vbatts deleted the vbatts-dm_logging branch April 27, 2016 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants