Merge pull request #28575 from backstage/rugvip/auditr
backend-defaults: isAuditorEvent -> isAuditEvent
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user