File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
mcp/src/main/java/io/modelcontextprotocol/client Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -31,16 +31,17 @@ public class Slf4jLoggingConsumer implements Consumer<McpSchema.LoggingMessageNo
3131 // https://github.com/google/adk-java/pull/370. It's now been moved here to be useful
3232 // to others.
3333
34+ private static final Logger LOG = LoggerFactory .getLogger (Slf4jLoggingConsumer .class );
35+
3436 @ Override
3537 public void accept (LoggingMessageNotification notif ) {
36- Logger log = LoggerFactory .getLogger (notif .logger ());
3738 if (notif .meta ().isEmpty ()) {
3839 // If no meta, then just log the data as a message
39- log .atLevel (convert (notif .level ())).log (notif .data ());
40+ LOG .atLevel (convert (notif .level ())).log (notif .data ());
4041 }
4142 else {
4243 // If there is meta, then log it as a structured log message
43- var builder = log .atLevel (convert (notif .level ())).setMessage (notif .data ());
44+ var builder = LOG .atLevel (convert (notif .level ())).setMessage (notif .data ());
4445 notif .meta ().forEach ((key , value ) -> builder .addKeyValue (key , value ));
4546 builder .log ();
4647 }
You can’t perform that action at this time.
0 commit comments