Log error messages during app Bootstrap.ts
This commit is contained in:
parent
18fef76807
commit
dcc2fb4dc8
@ -39,9 +39,11 @@ export class Bootstrap implements IBootstrap {
|
|||||||
port: number | string | undefined = process.env.PORT,
|
port: number | string | undefined = process.env.PORT,
|
||||||
hostname?: string,
|
hostname?: string,
|
||||||
) {
|
) {
|
||||||
|
const apiLogger = loggerFactory.getLogger('api')
|
||||||
try {
|
try {
|
||||||
await this.start(port, hostname)
|
await this.start(port, hostname)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
apiLogger.error('Error starting server: %s', err.stack)
|
||||||
this.exit(1)
|
this.exit(1)
|
||||||
throw err
|
throw err
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user