aboutsummaryrefslogtreecommitdiff
path: root/logger/logger_test.go
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-09-22 19:47:27 +0200
committern-peugnet <n.peugnet@free.fr>2021-09-22 20:44:24 +0200
commita1b768438258bfd6c33573e156708f002c693ba2 (patch)
tree0ce9ef80263061e746fe10d93058b106cb93ee1f /logger/logger_test.go
parent368f89466f48e8621254b04c1bca996db5c7a66a (diff)
downloaddna-backup-a1b768438258bfd6c33573e156708f002c693ba2.tar.gz
dna-backup-a1b768438258bfd6c33573e156708f002c693ba2.zip
add debug log level
Diffstat (limited to 'logger/logger_test.go')
-rw-r--r--logger/logger_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/logger/logger_test.go b/logger/logger_test.go
index 2352856..2e1ff25 100644
--- a/logger/logger_test.go
+++ b/logger/logger_test.go
@@ -116,8 +116,8 @@ func TestFlags(t *testing.T) {
SetOutput(&buf)
l.Infof("info %d", sInfo)
s := buf.String()
- if !strings.Contains(s, "info 0") {
- t.Errorf("log output %q should contain: info 0", s)
+ if !strings.Contains(s, "info 1") {
+ t.Errorf("log output %q should contain: info 1", s)
}
path := "logger/logger_test.go:117"
if !strings.Contains(s, path) {
@@ -133,13 +133,13 @@ func TestFlags(t *testing.T) {
if !strings.Contains(s, "warning") {
t.Errorf("log output %q should contain: warning", s)
}
- if !strings.Contains(s, "warning 1") {
- t.Errorf("log output %q should contain: warning 1", s)
+ if !strings.Contains(s, "warning 2") {
+ t.Errorf("log output %q should contain: warning 2", s)
}
if !strings.Contains(s, "error") {
t.Errorf("log output %q should contain: error", s)
}
- if !strings.Contains(s, "error 2") {
- t.Errorf("log output %q should contain: error 2", s)
+ if !strings.Contains(s, "error 3") {
+ t.Errorf("log output %q should contain: error 3", s)
}
}