X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Flogger.ts;h=29e06860dbf9ca0604805dc94bfeab2e75aa1d46;hb=295106516277581ba4967199fa5580264a90ae2c;hp=a112fd30006b1d2f7706c5946d386261d6b23b61;hpb=452b3bea082481b84537e55c7cedc1e24860d543;p=github%2FChocobozzz%2FPeerTube.git 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,