Fix log config setup (#5807)

The return value of Set() was not checked.
Hence, the typo ("al" instead of "af") wasn't catched.

Signed-off-by: François (fser) <fser@code-libre.org>
pull/5812/head
@aifsair 5 years ago committed by Brian Brazil
parent b7bb278e95
commit 0f00737308

@ -274,9 +274,15 @@ func TestEndpoints(t *testing.T) {
}
al := promlog.AllowedLevel{}
al.Set("debug")
if err := al.Set("debug"); err != nil {
t.Fatal(err)
}
af := promlog.AllowedFormat{}
al.Set("logfmt")
if err := af.Set("logfmt"); err != nil {
t.Fatal(err)
}
promlogConfig := promlog.Config{
Level: &al,
Format: &af,

Loading…
Cancel
Save