feat: add backend.auditor.severityLogLevelMappings to map severity levels to log levels

Signed-off-by: Paul Schultz <pschultz@pobox.com>
This commit is contained in:
Paul Schultz
2025-03-04 13:21:19 -06:00
parent 02981a2377
commit 175528cce3
5 changed files with 236 additions and 7 deletions
+26
View File
@@ -82,6 +82,32 @@ export interface Config {
};
};
/**
* Options used by the default auditor service.
*/
auditor?: {
/**
* Defines how audit event severity levels are mapped to log levels.
* This allows you to control the verbosity of audit logs based on the
* severity of the event. For example, you might want to log 'low' severity
* events as 'debug' messages, while logging 'critical' events as 'error'
* messages. Each severity level ('low', 'medium', 'high', 'critical')
* can be mapped to one of the standard log levels ('debug', 'info', 'warn', 'error').
*
* By default, audit events are mapped to log levels as follows:
* - `low`: `debug`
* - `medium`: `info`
* - `high`: `info`
* - `critical`: `info`
*/
severityLogLevelMappings?: {
low?: 'debug' | 'info' | 'warn' | 'error';
medium?: 'debug' | 'info' | 'warn' | 'error';
high?: 'debug' | 'info' | 'warn' | 'error';
critical?: 'debug' | 'info' | 'warn' | 'error';
};
};
/**
* Options used by the default auth, httpAuth and userInfo services.
*/