diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-02 16:49:59 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-02 16:57:53 +0200 |
commit | 463206948d6a9d46e7e68d55c7b763e601ecc870 (patch) | |
tree | a3b8e804f457d47d6465c670682dde18918307bb /server/helpers/logger.ts | |
parent | e872632091cbec15da05ce74d89fed4527ab93eb (diff) | |
download | PeerTube-463206948d6a9d46e7e68d55c7b763e601ecc870.tar.gz PeerTube-463206948d6a9d46e7e68d55c7b763e601ecc870.tar.zst PeerTube-463206948d6a9d46e7e68d55c7b763e601ecc870.zip |
Add tags to logs in AP videos
Diffstat (limited to 'server/helpers/logger.ts')
-rw-r--r-- | server/helpers/logger.ts | 5 |
1 files changed, 4 insertions, 1 deletions
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 = { | |||
151 | fatal: bunyanLogFactory('error') | 151 | fatal: bunyanLogFactory('error') |
152 | } | 152 | } |
153 | 153 | ||
154 | function loggerTagsFactory (...defaultTags: string[]) { | 154 | type LoggerTagsFn = (...tags: string[]) => { tags: string[] } |
155 | function loggerTagsFactory (...defaultTags: string[]): LoggerTagsFn { | ||
155 | return (...tags: string[]) => { | 156 | return (...tags: string[]) => { |
156 | return { tags: defaultTags.concat(tags) } | 157 | return { tags: defaultTags.concat(tags) } |
157 | } | 158 | } |
@@ -160,6 +161,8 @@ function loggerTagsFactory (...defaultTags: string[]) { | |||
160 | // --------------------------------------------------------------------------- | 161 | // --------------------------------------------------------------------------- |
161 | 162 | ||
162 | export { | 163 | export { |
164 | LoggerTagsFn, | ||
165 | |||
163 | buildLogger, | 166 | buildLogger, |
164 | timestampFormatter, | 167 | timestampFormatter, |
165 | labelFormatter, | 168 | labelFormatter, |