From b523644423fb00b25b1d20af423468da920153c7 Mon Sep 17 00:00:00 2001 From: Kofo Okesola Date: Thu, 24 Oct 2024 12:21:02 +0100 Subject: [PATCH] modified default streams logger --- ee/middleware/streams/manager.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ee/middleware/streams/manager.go b/ee/middleware/streams/manager.go index 42b2ce78f36..5412174007e 100644 --- a/ee/middleware/streams/manager.go +++ b/ee/middleware/streams/manager.go @@ -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,