@autofleet/shtinker 1.1.3-beta.4 → 1.1.3
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 +1 -1
- package/package.json +1 -1
- package/src/audit-logger.ts +1 -8
package/dist/audit-logger.js
CHANGED
|
@@ -40,7 +40,7 @@ class AuditLogger {
|
|
|
40
40
|
modelType.addHook('afterSave', (instance, options) => __awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
try {
|
|
42
42
|
const auditContext = getAuditContext();
|
|
43
|
-
logger_1.default.
|
|
43
|
+
logger_1.default.info('shtinker afterSave', {
|
|
44
44
|
auditContext,
|
|
45
45
|
modelName,
|
|
46
46
|
instance,
|
package/package.json
CHANGED
package/src/audit-logger.ts
CHANGED
|
@@ -39,13 +39,6 @@ class AuditLogger {
|
|
|
39
39
|
modelType.addHook('afterSave', async (instance: any, options: any) => {
|
|
40
40
|
try {
|
|
41
41
|
const auditContext = getAuditContext();
|
|
42
|
-
logger.log('shtinker afterSave', {
|
|
43
|
-
auditContext,
|
|
44
|
-
modelName,
|
|
45
|
-
instance,
|
|
46
|
-
options,
|
|
47
|
-
changedProperties: getChangedFields(instance, options),
|
|
48
|
-
});
|
|
49
42
|
if (auditContext) {
|
|
50
43
|
const changedProperties = getChangedFields(instance, options);
|
|
51
44
|
const payload: AuditLogPayload = {
|
|
@@ -60,7 +53,7 @@ class AuditLogger {
|
|
|
60
53
|
this.sendAuditLogRows(payload);
|
|
61
54
|
}
|
|
62
55
|
} catch (error) {
|
|
63
|
-
logger.error('Failed to send audit log context',
|
|
56
|
+
logger.error('Failed to send audit log context', error);
|
|
64
57
|
}
|
|
65
58
|
});
|
|
66
59
|
});
|