1
0
Fork 0

fix: enable stdio logging when otlp is enabled

This commit is contained in:
Landry Benguigui 2025-10-17 16:06:06 +02:00 committed by GitHub
parent 862116c050
commit 6e0012cb0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 161 additions and 7 deletions

View file

@ -68,10 +68,6 @@ func setupLogger(ctx context.Context, staticConfiguration *static.Configuration)
}
func getLogWriter(staticConfiguration *static.Configuration) io.Writer {
if staticConfiguration.Log != nil && staticConfiguration.Log.OTLP != nil {
return io.Discard
}
var w io.Writer = os.Stdout
if staticConfiguration.Log != nil && len(staticConfiguration.Log.FilePath) > 0 {
_, _ = os.OpenFile(staticConfiguration.Log.FilePath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0o666)