agent: Ensure logger set up method is public. (#24886)

This is needed by a Nomad Enterprise code path.
This commit is contained in:
James Rasell
2025-01-17 14:47:06 +01:00
committed by GitHub
parent 1df94b1470
commit 63ea13be77
2 changed files with 8 additions and 5 deletions

View File

@@ -639,7 +639,7 @@ func Test_setupLoggers_logFile(t *testing.T) {
}
// Generate the loggers and ensure the correct error is generated.
gatedWriter, writer := setupLoggers(mockUI, cfg)
gatedWriter, writer := SetupLoggers(mockUI, cfg)
must.Nil(t, gatedWriter)
must.Nil(t, writer)
must.StrContains(t, mockUI.ErrorWriter.String(), "Invalid log level: WARNING")
@@ -650,7 +650,7 @@ func Test_setupLoggers_logFile(t *testing.T) {
// Update the log level, so that it is a valid option and set up the
// loggers again.
cfg.LogLevel = "warn"
gatedWriter, writer = setupLoggers(mockUI, cfg)
gatedWriter, writer = SetupLoggers(mockUI, cfg)
must.NotNil(t, gatedWriter)
must.NotNil(t, writer)