From 452b3bea082481b84537e55c7cedc1e24860d543 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 5 Mar 2021 13:26:02 +0100 Subject: Introduce tags to the logger That could help to filter unneeded logs and/or select particular components --- server/lib/video-blacklist.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/lib/video-blacklist.ts') diff --git a/server/lib/video-blacklist.ts b/server/lib/video-blacklist.ts index dbb37e0b2..37c43c3b0 100644 --- a/server/lib/video-blacklist.ts +++ b/server/lib/video-blacklist.ts @@ -11,7 +11,7 @@ import { } from '@server/types/models' import { UserRight, VideoBlacklistCreate, VideoBlacklistType } from '../../shared/models' import { UserAdminFlag } from '../../shared/models/users/user-flag.model' -import { logger } from '../helpers/logger' +import { logger, loggerTagsFactory } from '../helpers/logger' import { CONFIG } from '../initializers/config' import { VideoBlacklistModel } from '../models/video/video-blacklist' import { sendDeleteVideo } from './activitypub/send' @@ -20,6 +20,8 @@ import { LiveManager } from './live-manager' import { Notifier } from './notifier' import { Hooks } from './plugins/hooks' +const lTags = loggerTagsFactory('blacklist') + async function autoBlacklistVideoIfNeeded (parameters: { video: MVideoWithBlacklistLight user?: MUser @@ -60,7 +62,7 @@ async function autoBlacklistVideoIfNeeded (parameters: { }) } - logger.info('Video %s auto-blacklisted.', video.uuid) + logger.info('Video %s auto-blacklisted.', video.uuid, lTags(video.uuid)) return true } -- cgit v1.2.3