@autofleet/shtinker 1.1.6 → 1.1.7-beta.0
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.
- package/dist/audit-logger.js +2 -0
- package/package.json +1 -1
- package/src/audit-logger.ts +2 -0
package/dist/audit-logger.js
CHANGED
|
@@ -51,6 +51,7 @@ class AuditLogger {
|
|
|
51
51
|
modelType.addHook('afterSave', (instance, options) => __awaiter(this, void 0, void 0, function* () {
|
|
52
52
|
try {
|
|
53
53
|
const auditContext = getAuditContext();
|
|
54
|
+
logger_1.default.info('auditContext from shtinker', { auditContext });
|
|
54
55
|
if (auditContext) {
|
|
55
56
|
const changedProperties = getChangedFields(instance, options);
|
|
56
57
|
const payload = {
|
|
@@ -62,6 +63,7 @@ class AuditLogger {
|
|
|
62
63
|
newValue: instance.get(property),
|
|
63
64
|
})),
|
|
64
65
|
};
|
|
66
|
+
logger_1.default.info('sending audit log rows from shtinker', { payload });
|
|
65
67
|
this.sendAuditLogRows(payload);
|
|
66
68
|
}
|
|
67
69
|
}
|
package/package.json
CHANGED
package/src/audit-logger.ts
CHANGED
|
@@ -52,6 +52,7 @@ class AuditLogger {
|
|
|
52
52
|
modelType.addHook('afterSave', async (instance: any, options: any) => {
|
|
53
53
|
try {
|
|
54
54
|
const auditContext = getAuditContext();
|
|
55
|
+
logger.info('auditContext from shtinker', { auditContext });
|
|
55
56
|
if (auditContext) {
|
|
56
57
|
const changedProperties = getChangedFields(instance, options);
|
|
57
58
|
const payload: AuditLogPayload = {
|
|
@@ -63,6 +64,7 @@ class AuditLogger {
|
|
|
63
64
|
newValue: instance.get(property),
|
|
64
65
|
})),
|
|
65
66
|
};
|
|
67
|
+
logger.info('sending audit log rows from shtinker', { payload });
|
|
66
68
|
this.sendAuditLogRows(payload);
|
|
67
69
|
}
|
|
68
70
|
} catch (error) {
|