mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -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 := promlog.AllowedLevel{}
|
||||||
al.Set("debug")
|
if err := al.Set("debug"); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
af := promlog.AllowedFormat{}
|
af := promlog.AllowedFormat{}
|
||||||
al.Set("logfmt")
|
if err := af.Set("logfmt"); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
promlogConfig := promlog.Config{
|
promlogConfig := promlog.Config{
|
||||||
Level: &al,
|
Level: &al,
|
||||||
Format: &af,
|
Format: &af,
|
||||||
|
|
Loading…
Reference in a new issue