summaryrefslogtreecommitdiffhomepage
path: root/pkg/log/log.go
diff options
context:
space:
mode:
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