Skip to content

Commit

Permalink
Adjusted log levels.
Browse files Browse the repository at this point in the history
  • Loading branch information
shrihari-prakash committed Dec 31, 2023
1 parent 77d0670 commit e32535d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/service/api/user/do-2fa.post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const POST_Do2FA = async (req: Request, res: Response) => {
loginMeta.success = false;
loginMeta.reason = LoginFailure.MFA_REJECTED;
await new LoginHistoryModel(loginMeta).save();
log.debug("Login metadata saved %o.", loginMeta);
log.info("Login metadata saved to database %o.", loginMeta);
}
return res.status(statusCodes.clientInputError).json(new ErrorResponse(errorMessages.clientInputError));
}
Expand All @@ -43,7 +43,7 @@ const POST_Do2FA = async (req: Request, res: Response) => {
if (Configuration.get("user.login.record-successful-attempts")) {
const loginMeta = req.session.loginMeta;
await new LoginHistoryModel(loginMeta).save();
log.debug("Login metadata saved %o.", loginMeta);
log.info("Login metadata saved to database %o.", loginMeta);
}
req.session.save(function (err) {
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion src/service/api/user/login.post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const POST_Login = async (req: Request, res: Response) => {
};
const sessionHash = code.sessionHash;
req.session.save(function (err) {
log.debug("Login meta written to session for user %s.", user._id);
log.info("Login meta written to session for user %s.", user._id);
if (err) {
log.error(err);
return res.status(statusCodes.internalError).json(new ErrorResponse(errorMessages.internalError));
Expand Down

0 comments on commit e32535d

Please sign in to comment.