Conversation
|
@cpuguy83 When debugging devicemapper issues from customers I found I wanted to see more detail from libdevmapper. This PR allows me to do so without rebuilding docker. |
|
Would it make sense to do this automatically if the daemon is put in debug mode? |
|
@thaJeztah I thought about doing just that, but the amount of output could have an effect on debugging other areas of the daemon. So I limited the scope. |
8dee77f to
d498009
Compare
There was a problem hiding this comment.
I'd prefer to not expose this to users. Passing through the logrus logging level seems the easiest way to set this.
Allow libdevmapper logging to be configured when starting the daemon rather than at compile time to better facilitate debugging. The logrus log level from the daemon is mapped unto the libdevmapper log entries for filtering. The additional libdevmapper levels not included within the logrus framework are logged within the text of the log entry. Signed-off-by: Jhon Honce <jhonce@redhat.com>
|
@cpuguy83 @thaJeztah Patch updated to be driven by logrus's log level |
cpuguy83
left a comment
There was a problem hiding this comment.
Sorry about the long wait time for a review here, just a minor change and I think we'll be good to move forward.
|
|
||
| // Working "notice" level into mappings as that is not a direct mapping for logrus log levels. | ||
| var logFunc = []func(format string, args ...interface{}){ | ||
| logrus.Infof, |
There was a problem hiding this comment.
There shouldn't be a need to pull in logrus into this package.
Instead we can do the conversion in the devicmapper graphdriver package to devmapper levels defined in this package.
|
Thanks @cyphar |
Allow libdevmapper logging to be configured when starting the daemon
rather than at compile time to better facilitate debugging. The logrus
log level from the daemon is mapped unto the libdevmapper log entries
for filtering.
The additional libdevmapper levels not included within the logrus
framework are logged within the text of the log entry.
Chang log:
Match libdevmapper graphdriver log level to logrus level within daemon.
Signed-off-by: Jhon Honce jhonce@redhat.com