Skip to content

Commit

Permalink
Ensure pipe logger gets attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniomika committed Feb 27, 2025
1 parent a5e8f68 commit d1cb688
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shared/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,15 @@ func CreateLogger(space string) *slog.Logger {
Level: slog.LevelInfo,
},
),
).With("service", space)
)

if strings.ToLower(utils.GetEnv("PICO_PIPE_ENABLED", "true")) == "true" {
conn := NewPicoPipeClient()
logger = pipeLogger.RegisterReconnectLogger(context.Background(), logger, conn, 100, 10*time.Millisecond)
}

logger = logger.With("service", space)

hostname, err := os.Hostname()
if err == nil && hostname != "" {
logger = logger.With("hostname", hostname)
Expand Down

0 comments on commit d1cb688

Please sign in to comment.