File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 VersionNotFoundError ,
1313} from "../tools" ;
1414import { createError , createResponse } from "./utils" ;
15+ import { logger } from "../utils/logger" ;
1516
1617export async function startServer ( ) {
1718 const docService = new DocumentManagementService ( ) ;
@@ -274,7 +275,7 @@ ${formattedResults.join("")}`,
274275 // Start server
275276 const transport = new StdioServerTransport ( ) ;
276277 await server . connect ( transport ) ;
277- console . error ( "Documentation MCP server running on stdio" ) ;
278+ logger . info ( "Documentation MCP server running on stdio" ) ;
278279
279280 // Handle cleanup
280281 process . on ( "SIGINT" , async ( ) => {
@@ -284,7 +285,7 @@ ${formattedResults.join("")}`,
284285 } ) ;
285286 } catch ( error ) {
286287 await docService . shutdown ( ) ;
287- console . error ( "Error:" , error instanceof Error ? error . message : String ( error ) ) ;
288+ logger . error ( `❌ Fatal Error: ${ error } ` ) ;
288289 process . exit ( 1 ) ;
289290 }
290291}
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22import { startServer } from "./mcp" ;
3+ import { logger } from "./utils/logger" ;
34
45startServer ( ) . catch ( ( error ) => {
5- console . error ( " Fatal error:" , error ) ;
6+ logger . error ( `❌ Fatal Error: ${ error } ` ) ;
67 process . exit ( 1 ) ;
78} ) ;
You can’t perform that action at this time.
0 commit comments