@easyweb/rabbitmq-utils 1.0.15 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { Logger } from "pino";
|
|
2
|
-
import { AuditLogFields } from "./types";
|
|
3
|
-
export declare function logAuditEvent(logger: Logger,
|
|
4
|
-
|
|
5
|
-
env: string;
|
|
6
|
-
}, message: string): void;
|
|
2
|
+
import { AuditLogFields, PaymentAuditFields } from "./types";
|
|
3
|
+
export declare function logAuditEvent(logger: Logger, fields: AuditLogFields, message: string): void;
|
|
4
|
+
export declare function logPaymentAuditEvent(logger: Logger, fields: PaymentAuditFields, message: string): void;
|
|
7
5
|
//# sourceMappingURL=audit-logger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-logger.d.ts","sourceRoot":"","sources":["../../src/observability/audit-logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"audit-logger.d.ts","sourceRoot":"","sources":["../../src/observability/audit-logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7D,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,MAAM,GACd,IAAI,CAGN;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,kBAAkB,EAC1B,OAAO,EAAE,MAAM,GACd,IAAI,CAEN"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.logAuditEvent = logAuditEvent;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
exports.logPaymentAuditEvent = logPaymentAuditEvent;
|
|
5
|
+
function logAuditEvent(logger, fields, message) {
|
|
6
|
+
const level = fields.outcome === "failure" ? "warn" : "info";
|
|
7
|
+
logger[level](fields, message);
|
|
8
|
+
}
|
|
9
|
+
function logPaymentAuditEvent(logger, fields, message) {
|
|
10
|
+
logger.info(fields, message);
|
|
7
11
|
}
|
|
8
12
|
//# sourceMappingURL=audit-logger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-logger.js","sourceRoot":"","sources":["../../src/observability/audit-logger.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"audit-logger.js","sourceRoot":"","sources":["../../src/observability/audit-logger.ts"],"names":[],"mappings":";;AAGA,sCAOC;AAED,oDAMC;AAfD,SAAgB,aAAa,CAC3B,MAAc,EACd,MAAsB,EACtB,OAAe;IAEf,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAC7D,MAAM,CAAC,KAAK,CAAC,CAAC,MAA+B,EAAE,OAAO,CAAC,CAAC;AAC1D,CAAC;AAED,SAAgB,oBAAoB,CAClC,MAAc,EACd,MAA0B,EAC1B,OAAe;IAEf,MAAM,CAAC,IAAI,CAAC,MAAmC,EAAE,OAAO,CAAC,CAAC;AAC5D,CAAC"}
|