Ensure logger writes to log_file by preventing overwrite of InterceptLogger's output (#29917)

* Ensure logger writes to log_file by preventing overwrite of InterceptLogger's output

* add changelog
This commit is contained in:
Ellie 2025-03-13 13:43:40 -05:00 committed by GitHub
parent c4dc26ba7d
commit c56db5a575
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

3
changelog/29917.txt Normal file
View file

@ -0,0 +1,3 @@
```release-note:bug
core: Fix a bug that prevents certain loggers from writing to a log file.
```

View file

@ -420,9 +420,7 @@ func (c *ServerCommand) AutocompleteFlags() complete.Flags {
}
func (c *ServerCommand) flushLog() {
c.logger.(hclog.OutputResettable).ResetOutputWithFlush(&hclog.LoggerOptions{
Output: c.logWriter,
}, c.logGate)
c.logGate.Flush()
}
func (c *ServerCommand) parseConfig() (*server.Config, []configutil.ConfigError, error) {