You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* reorganization of logger.ts and log levels
* adding logging
* minor change bump
* remove logs in test
* version bumped
* rename logInvocation to notifyInvocation
* added optional param to log error
* major version bump
* update log calls
* fix logging mistake
* using info instead of error
* adding log error into its field
* remove auth log
* changing log message field type to string
* consolidating to use LogEntry
* updated version
* conforming logging output
* added logLevel
* address comments
* change log levdels going up
* making notificationLevel and logLevel the sme set:
* address nit
// Port is now open. Wait for server info before logging the ready message.
55
71
awaitserverInfoReady;
56
72
57
73
if(!config.oauth.enabled){
58
-
console.warn(
59
-
'⚠️ TRANSPORT is "http" but OAuth is disabled! Your MCP server may not be protected from unauthorized access! By having explicitly disabled OAuth by setting the DANGEROUSLY_DISABLE_OAUTH environment variable to "true", you accept any and all risks associated with this decision.',
60
-
);
74
+
log({
75
+
message:
76
+
'⚠️ TRANSPORT is "http" but OAuth is disabled! Your MCP server may not be protected from unauthorized access! By having explicitly disabled OAuth by setting the DANGEROUSLY_DISABLE_OAUTH environment variable to "true", you accept any and all risks associated with this decision.',
77
+
level: 'info',
78
+
logger: 'startup',
79
+
});
61
80
}
62
81
63
-
// eslint-disable-next-line no-console -- console.log is intentional here since the transport is not stdio.
64
-
console.log(
65
-
`${serverName} v${serverVersion}${config.disableSessionManagement ? 'stateless ' : ''}streamable HTTP server available at ${url}`,
66
-
);
82
+
log({
83
+
message: `${serverName} v${serverVersion}${config.disableSessionManagement ? 'stateless ' : ''}streamable HTTP server available at ${url}`,
84
+
level: 'info',
85
+
logger: 'startup',
86
+
});
67
87
break;
68
88
}
69
89
}
70
90
71
91
if(config.disableLogMasking){
72
-
writeToStderr('⚠️ Log masking is disabled!');
92
+
log({message: '⚠️ Log masking is disabled!',level: 'info',logger: 'startup'});
73
93
}
74
94
75
95
if(config.breakGlassDisableGlobally){
76
-
writeToStderr(
77
-
'⚠️ BREAK_GLASS_DISABLE_GLOBALLY is enabled! This means that the MCP server will be disabled globally and will return errors to all users!',
78
-
);
96
+
log({
97
+
message:
98
+
'⚠️ BREAK_GLASS_DISABLE_GLOBALLY is enabled! This means that the MCP server will be disabled globally and will return errors to all users!',
99
+
level: 'info',
100
+
logger: 'startup',
101
+
});
79
102
}
80
103
}
81
104
82
105
startServer().catch((error)=>{
83
-
writeToStderr(`Fatal error when starting the server: ${getExceptionMessage(error)}`);
0 commit comments