mirror of
https://github.com/prometheus/prometheus
synced 2026-05-01 07:30:30 +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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user