nestjs-auditlog
Version:
A powerful package for auditlog using opentelemetry in NestJS applications
26 lines (25 loc) • 981 B
TypeScript
import { ClickHouseClient } from '@clickhouse/client';
import { IAuditLog, IAuditLogClickHouseExporterOption, IAuditLogExporter } from '../audit-log.interface';
export declare class AuditlogClickHouseExporter implements IAuditLogExporter {
private readonly databaseName;
private readonly logExpired;
private readonly auditLogTableName;
private readonly options;
private client?;
constructor(options: IAuditLogClickHouseExporterOption);
clone(): IAuditLogExporter;
createClickhouseClient(): ClickHouseClient;
getClient(): ClickHouseClient | undefined;
startup(): Promise<void>;
shutdown(): Promise<void>;
sendAuditLog(log: IAuditLog): Promise<void>;
/**
* the transformation function to convert audit log object to readable log body string
*
* @param log audit log
* @returns log body
*/
customLoggerBodyTransformation(log: IAuditLog): string;
private padTo2Digits;
private formatDateToUTC;
}