Skip to content

Commit e1c96c5

Browse files
committed
Refactor to use constant default error log level
1 parent 6c25768 commit e1c96c5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

internal/mode/static/state/dataplane/configuration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,6 @@ func buildLogging(g *graph.Graph) Logging {
910910
func GetDefaultConfiguration(configVersion int) Configuration {
911911
return Configuration{
912912
Version: configVersion,
913-
Logging: Logging{ErrorLevel: "info"},
913+
Logging: Logging{ErrorLevel: defaultErrorLogLevel},
914914
}
915915
}

internal/mode/static/state/dataplane/configuration_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func getExpectedConfiguration() Configuration {
6262
},
6363
CertBundles: map[CertBundleID]CertBundle{},
6464
Logging: Logging{
65-
ErrorLevel: "info",
65+
ErrorLevel: defaultErrorLogLevel,
6666
},
6767
}
6868
}
@@ -1496,7 +1496,7 @@ func TestBuildConfiguration(t *testing.T) {
14961496
}
14971497
return g
14981498
}),
1499-
expConf: Configuration{Logging: Logging{ErrorLevel: "info"}},
1499+
expConf: Configuration{Logging: Logging{ErrorLevel: defaultErrorLogLevel}},
15001500
msg: "invalid gatewayclass",
15011501
},
15021502
{
@@ -1515,15 +1515,15 @@ func TestBuildConfiguration(t *testing.T) {
15151515
}
15161516
return g
15171517
}),
1518-
expConf: Configuration{Logging: Logging{ErrorLevel: "info"}},
1518+
expConf: Configuration{Logging: Logging{ErrorLevel: defaultErrorLogLevel}},
15191519
msg: "missing gatewayclass",
15201520
},
15211521
{
15221522
graph: getModifiedGraph(func(g *graph.Graph) *graph.Graph {
15231523
g.Gateway = nil
15241524
return g
15251525
}),
1526-
expConf: Configuration{Logging: Logging{ErrorLevel: "info"}},
1526+
expConf: Configuration{Logging: Logging{ErrorLevel: defaultErrorLogLevel}},
15271527
msg: "missing gateway",
15281528
},
15291529
{
@@ -3831,7 +3831,7 @@ func TestBuildLogging(t *testing.T) {
38313831
},
38323832
},
38333833
},
3834-
expLoggingSettings: Logging{ErrorLevel: "info"},
3834+
expLoggingSettings: Logging{ErrorLevel: defaultErrorLogLevel},
38353835
},
38363836
{
38373837
msg: "NginxProxy log level set to notice",

0 commit comments

Comments
 (0)