feat(secret-rotation): changed queue logging to pino

This commit is contained in:
Akhil Mohan
2023-11-01 22:24:58 +05:30
parent 75eeda4278
commit 40238788e5
2 changed files with 16 additions and 26 deletions
+2 -1
View File
@@ -18,6 +18,7 @@ import { ENCODING_SCHEME_BASE64, ENCODING_SCHEME_UTF8, SECRET_SHARED } from "../
import { EESecretService } from "../../services";
import { SecretVersion } from "../../models";
import { eventPushSecrets } from "../../../events";
import { logger } from "../../../utils/logging";
import {
secretRotationPreSetFn,
@@ -260,7 +261,7 @@ secretRotationQueue.process(async (job: Job) => {
});
}
} catch (err) {
console.error(err);
logger.error(err);
await SecretRotation.findByIdAndUpdate(rotationStratDocId, {
status: "failed",
statusMessage: (err as Error).message,