Skip to content

Commit

Permalink
modified default streams logger
Browse files Browse the repository at this point in the history
  • Loading branch information
kofoworola committed Oct 29, 2024
1 parent dafbab6 commit b523644
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ee/middleware/streams/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ func (sm *Manager) createStream(streamID string, config map[string]interface{})
streamFullID := fmt.Sprintf("%s_%s", sm.mw.Spec.APIID, streamID)
sm.mw.Logger().Debugf("Creating stream: %s", streamFullID)

// add logger to config
config["logger"] = map[string]interface{}{
"level": "INFO",
"format": "json",
"add_timestamp": true,
"static_fields": map[string]interface{}{
"stream": streamID,
},
}

stream := NewStream(sm.mw.allowedUnsafe)
err := stream.Start(config, &handleFuncAdapter{
mw: sm.mw,
Expand Down

0 comments on commit b523644

Please sign in to comment.