mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
3e22b89fa2
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
10 lines
391 B
TypeScript
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);
|
|
}
|
|
}
|