From 463206948d6a9d46e7e68d55c7b763e601ecc870 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 2 Jun 2021 16:49:59 +0200 Subject: Add tags to logs in AP videos --- server/helpers/logger.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server/helpers') diff --git a/server/helpers/logger.ts b/server/helpers/logger.ts index a112fd300..29e06860d 100644 --- a/server/helpers/logger.ts +++ b/server/helpers/logger.ts @@ -151,7 +151,8 @@ const bunyanLogger = { fatal: bunyanLogFactory('error') } -function loggerTagsFactory (...defaultTags: string[]) { +type LoggerTagsFn = (...tags: string[]) => { tags: string[] } +function loggerTagsFactory (...defaultTags: string[]): LoggerTagsFn { return (...tags: string[]) => { return { tags: defaultTags.concat(tags) } } @@ -160,6 +161,8 @@ function loggerTagsFactory (...defaultTags: string[]) { // --------------------------------------------------------------------------- export { + LoggerTagsFn, + buildLogger, timestampFormatter, labelFormatter, -- cgit v1.2.3