feature: add level-based logger methods for convenience

This commit is contained in:
Ruben Taelman
2020-09-23 09:11:44 +02:00
committed by Ruben Taelman
parent 6212c15352
commit db9aefe551
8 changed files with 114 additions and 12 deletions

View File

@@ -52,7 +52,7 @@ export const runCustom = function(
}) as Setup;
return await setup.setup();
})().then((base: string): void => {
logger.log('info', `Running at ${base}`);
logger.info(`Running at ${base}`);
}).catch((error): void => {
// This is the only time we can *not* use the logger to print error messages, as dependency injection has failed.
stderr.write(`${error}\n`);

View File

@@ -71,7 +71,7 @@ export class Setup {
},
);
};
this.logger.log('debug', 'Setup default ACL settings');
this.logger.debug('Setup default ACL settings');
await aclSetup();
this.httpServer.listen(this.port);