Files
linuxkit/vendor/github.com/docker/infrakit/pkg/cli/logging.go
Rolf Neugebauer 6a29d153f5 infrakit: Move the hyperkit instance plugin into the source directory
- The tools directory ideally should not contain source code
- Removes double vendoring of packagages
- Makes it easer to hook the build into the top-level Makefile

Eventually, the plugin should be moved to the infrakit repo.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-25 13:02:45 +01:00

17 lines
366 B
Go

package cli
import log "github.com/Sirupsen/logrus"
// DefaultLogLevel is the default log level value.
var DefaultLogLevel = len(log.AllLevels) - 2
// SetLogLevel adjusts the logrus level.
func SetLogLevel(level int) {
if level > len(log.AllLevels)-1 {
level = len(log.AllLevels) - 1
} else if level < 0 {
level = 0
}
log.SetLevel(log.AllLevels[level])
}