mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 21:24:05 -08:00
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:
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…
Reference in a new issue