Merge pull request #28575 from backstage/rugvip/auditr

backend-defaults: isAuditorEvent -> isAuditEvent
This commit is contained in:
Patrik Oldsberg
2025-01-21 14:40:58 +01:00
committed by GitHub
3 changed files with 4 additions and 4 deletions
@@ -109,7 +109,7 @@ export type AuditorLogFunction = (event: AuditorEvent) => void | Promise<void>;
* plugin: coreServices.pluginMetadata,
* },
* factory({ logger, plugin, auth, httpAuth }) {
* const auditLogger = logger.child({ isAuditorEvent: true });
* const auditLogger = logger.child({ isAuditEvent: true });
* return DefaultAuditorService.create(
* event => auditLogger.info(`${event.plugin}.${event.eventId}`, event),
* { plugin, auth, httpAuth },
@@ -37,12 +37,12 @@ export const defaultFormatter = winston.format.combine(
);
/**
* Adds `isAuditorEvent` field
* Adds `isAuditEvent` field
*
* @public
*/
export const auditorFieldFormat = winston.format(info => {
return { ...info, isAuditorEvent: true };
return { ...info, isAuditEvent: true };
})();
/**
@@ -38,7 +38,7 @@ export const auditorServiceFactory = createServiceFactory({
plugin: coreServices.pluginMetadata,
},
factory({ logger, plugin, auth, httpAuth }) {
const auditLogger = logger.child({ isAuditorEvent: true });
const auditLogger = logger.child({ isAuditEvent: true });
return DefaultAuditorService.create(
event => auditLogger.info(`${event.plugin}.${event.eventId}`, event),
{ plugin, auth, httpAuth },