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>
This commit is contained in:
@aifsair 2019-07-29 19:00:30 +02:00 committed by Brian Brazil
parent b7bb278e95
commit 0f00737308

View file

@ -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,