Skip to content

Commit f4c2f23

Browse files
committed
chore: use logger for console log
1 parent bfb99ba commit f4c2f23

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

apps/api/src/main.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable no-console */
2-
31
import path from 'node:path';
42

53
import { ValidationPipe } from '@douglasneuroinformatics/libnest/core';
@@ -21,12 +19,12 @@ async function bootstrap() {
2119

2220
const configurationService = app.get(ConfigurationService);
2321

24-
app.useLogger(
25-
new JSONLogger(null, {
26-
debug: configurationService.get('DEBUG'),
27-
verbose: configurationService.get('VERBOSE')
28-
})
29-
);
22+
const logger = new JSONLogger(null, {
23+
debug: configurationService.get('DEBUG'),
24+
verbose: configurationService.get('VERBOSE')
25+
});
26+
27+
app.useLogger(logger);
3028

3129
app.enableCors();
3230
app.enableVersioning({
@@ -44,7 +42,7 @@ async function bootstrap() {
4442

4543
await app.listen(port);
4644

47-
console.log(`Application is running on: ${await app.getUrl()}`);
45+
logger.log(`Application is running on: ${await app.getUrl()}`);
4846
}
4947

5048
void bootstrap();

0 commit comments

Comments
 (0)