mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-26 17:15:59 +00:00
- 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>
17 lines
366 B
Go
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])
|
|
}
|