Skip to content

Commit

Permalink
fix logger initialization
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Buslaev <[email protected]>
  • Loading branch information
Artem Buslaev committed Jul 31, 2024
1 parent 5d3840c commit f4c559b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions auth-service/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
COMMON_CONNECTION_CONFIG,
DataBaseHelper,
LargePayloadContainer,
Logger,
MessageBrokerChannel,
Migration,
mongoForLoggingInitialization,
Expand Down Expand Up @@ -126,11 +125,11 @@ Promise.all([
if (Number.isInteger(maxPayload)) {
new LargePayloadContainer().runServer();
}
new Logger().info('auth service started', ['AUTH_SERVICE']);
await logger.info('auth service started', ['AUTH_SERVICE']);
})
validator.setInvalidAction(async () => {
await state.updateState(ApplicationStates.BAD_CONFIGURATION);
new Logger().error('Auth service not configured', ['AUTH_SERVICE']);
await logger.error('Auth service not configured', ['AUTH_SERVICE']);
})
await validator.validate();
} catch (error) {
Expand Down

0 comments on commit f4c559b

Please sign in to comment.