mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 18:55:19 -04:00
Add missing logging context at various places
Our custom logger supports providing the name of the function that calls the logger, this commit adds this context string where it was previously missing. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
763f67d5fb
commit
8b62b7d93c
3 changed files with 11 additions and 7 deletions
|
@ -224,13 +224,17 @@ export class AuthService {
|
|||
let removedTokens = 0;
|
||||
for (const token of tokens) {
|
||||
if (token.validUntil && token.validUntil.getTime() <= currentTime) {
|
||||
this.logger.debug(`AuthToken '${token.keyId}' was removed`);
|
||||
this.logger.debug(
|
||||
`AuthToken '${token.keyId}' was removed`,
|
||||
'removeInvalidTokens',
|
||||
);
|
||||
await this.authTokenRepository.remove(token);
|
||||
removedTokens++;
|
||||
}
|
||||
}
|
||||
this.logger.log(
|
||||
`${removedTokens} invalid AuthTokens were purged from the DB.`,
|
||||
'removeInvalidTokens',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue