diff --git a/packages/react-server/core/logging/server.js b/packages/react-server/core/logging/server.js index 92a4ce88a..f758f6ff3 100644 --- a/packages/react-server/core/logging/server.js +++ b/packages/react-server/core/logging/server.js @@ -123,8 +123,10 @@ function addTransport(group, transport) { }); } -function addRewriter(rewriter) { - common.forEachLogger(logger => logger.rewriters.push(rewriter)); +function addRewriter(group, rewriter) { + common.forEachLogger((logger, loggerGroup) => { + if (loggerGroup === group) logger.rewriters.push(rewriter); + }); } function setTimestamp(bool) {