From eb1c62d3d9157fc1c17659aea399a1b37db6b431 Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Tue, 28 Jan 2025 13:03:30 -0500 Subject: [PATCH] fix: cleaner logs for starting API --- api/src/unraid-api/main.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/src/unraid-api/main.ts b/api/src/unraid-api/main.ts index 977bb4e68..ac53b2a2e 100644 --- a/api/src/unraid-api/main.ts +++ b/api/src/unraid-api/main.ts @@ -43,10 +43,10 @@ export async function bootstrapNestServer(): Promise { if (Number.isNaN(parseInt(PORT))) { const result = await server.listen({ path: '/var/run/unraid-api.sock' }); - console.log('Server listening on %s', result); + apiLogger.info('Server listening on %s', result); } else { const result = await server.listen({ port: parseInt(PORT), host: '0.0.0.0' }); - console.log('Server listening on %s', result); + apiLogger.info('Server listening on %s', result); } // This 'ready' signal tells pm2 that the api has started. @@ -55,7 +55,9 @@ export async function bootstrapNestServer(): Promise { if (process.send) { process.send('ready'); } else { - console.log('Warning: process.send is unavailable. This will affect IPC communication with PM2.'); + apiLogger.warn( + 'Warning: process.send is unavailable. This will affect IPC communication with PM2.' + ); } apiLogger.info('Nest Server is now listening');