Skip to content

Commit 79f26ef

Browse files
committed
fix: cleaner logs for starting API
1 parent 508a5eb commit 79f26ef

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

api/src/unraid-api/main.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ export async function bootstrapNestServer(): Promise<NestFastifyApplication> {
4343

4444
if (Number.isNaN(parseInt(PORT))) {
4545
const result = await server.listen({ path: '/var/run/unraid-api.sock' });
46-
console.log('Server listening on %s', result);
46+
apiLogger.info('Server listening on %s', result);
4747
} else {
4848
const result = await server.listen({ port: parseInt(PORT), host: '0.0.0.0' });
49-
console.log('Server listening on %s', result);
49+
apiLogger.info('Server listening on %s', result);
5050
}
5151

5252
// This 'ready' signal tells pm2 that the api has started.
@@ -55,7 +55,9 @@ export async function bootstrapNestServer(): Promise<NestFastifyApplication> {
5555
if (process.send) {
5656
process.send('ready');
5757
} else {
58-
console.log('Warning: process.send is unavailable. This will affect IPC communication with PM2.');
58+
apiLogger.warn(
59+
'Warning: process.send is unavailable. This will affect IPC communication with PM2.'
60+
);
5961
}
6062
apiLogger.info('Nest Server is now listening');
6163

0 commit comments

Comments
 (0)