gristlabs_grist-core/app/server/lib/GristAuditLogger.ts
George Gevoian 3e22b89fa2 (core) Add audit logging machinery
Summary:
Adds machinery to support audit logging in the backend.

Logging is currently implemented by streaming events to external HTTP
endpoints. All flavors of Grist support a default "grist" payload format,
and Grist Enterprise additionally supports an HEC-compatible payload format.

Logging of all audit events will be added at a later date.

Test Plan: Server tests.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D4331
2024-09-12 12:13:41 -04:00

10 lines
391 B
TypeScript

import {AuditEvent, AuditEventName} from 'app/common/AuditEvent';
import {IAuditLogger} from 'app/server/lib/AuditLogger';
import {HTTPAuditLogger} from 'app/server/lib/HTTPAuditLogger';
export class GristAuditLogger extends HTTPAuditLogger implements IAuditLogger {
protected toJSON<Name extends AuditEventName>(event: AuditEvent<Name>): string {
return JSON.stringify(event);
}
}