summaryrefslogtreecommitdiffhomepage
path: root/pkg/log/log.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-06-24 22:11:11 +0000
committergVisor bot <gvisor-bot@google.com>2019-06-24 22:11:11 +0000
commit30b2aa26b5fcd11c589e910ffad05dc85a9c35d2 (patch)
tree401f933ab46e2e03d308fe36c2c8d6af9c158de4 /pkg/log/log.go
parentd01228b4707699238b93057065748e9391113358 (diff)
parentb21b1db7003aea8615ab9e6a4f07b74c97a32c24 (diff)
Merge b21b1db7 (automated)
Diffstat (limited to 'pkg/log/log.go')
-rw-r--r--pkg/log/log.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/log/log.go b/pkg/log/log.go
index 0765a1963..ab9ad01ef 100644
--- a/pkg/log/log.go
+++ b/pkg/log/log.go
@@ -50,6 +50,19 @@ const (
Debug
)
+func (l Level) String() string {
+ switch l {
+ case Warning:
+ return "Warning"
+ case Info:
+ return "Info"
+ case Debug:
+ return "Debug"
+ default:
+ return fmt.Sprintf("Invalid level: %d", l)
+ }
+}
+
// Emitter is the final destination for logs.
type Emitter interface {
// Emit emits the given log statement. This allows for control over the