aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/logger.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-17 15:25:58 +0200
committerChocobozzz <me@florianbigard.com>2022-08-17 15:25:58 +0200
commitbbd5aa7ead5f1554a0872963f957effc26d8c630 (patch)
treea32cad420cfabe4eab5df4e3f104fa34f734fa7d /server/helpers/logger.ts
parenta85d530384761a0af833caac9b38b9834517c9fa (diff)
downloadPeerTube-bbd5aa7ead5f1554a0872963f957effc26d8c630.tar.gz
PeerTube-bbd5aa7ead5f1554a0872963f957effc26d8c630.tar.zst
PeerTube-bbd5aa7ead5f1554a0872963f957effc26d8c630.zip
Reimplement a typed omit function
Diffstat (limited to 'server/helpers/logger.ts')
-rw-r--r--server/helpers/logger.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/logger.ts b/server/helpers/logger.ts
index 9625c1b33..6649db40f 100644
--- a/server/helpers/logger.ts
+++ b/server/helpers/logger.ts
@@ -1,11 +1,11 @@
1import { stat } from 'fs-extra' 1import { stat } from 'fs-extra'
2import { omit } from 'lodash'
3import { join } from 'path' 2import { join } from 'path'
4import { format as sqlFormat } from 'sql-formatter' 3import { format as sqlFormat } from 'sql-formatter'
5import { createLogger, format, transports } from 'winston' 4import { createLogger, format, transports } from 'winston'
6import { FileTransportOptions } from 'winston/lib/winston/transports' 5import { FileTransportOptions } from 'winston/lib/winston/transports'
7import { context } from '@opentelemetry/api' 6import { context } from '@opentelemetry/api'
8import { getSpanContext } from '@opentelemetry/api/build/src/trace/context-utils' 7import { getSpanContext } from '@opentelemetry/api/build/src/trace/context-utils'
8import { omit } from '@shared/core-utils'
9import { CONFIG } from '../initializers/config' 9import { CONFIG } from '../initializers/config'
10import { LOG_FILENAME } from '../initializers/constants' 10import { LOG_FILENAME } from '../initializers/constants'
11 11
@@ -204,5 +204,5 @@ function removeCyclicValues () {
204function getAdditionalInfo (info: any) { 204function getAdditionalInfo (info: any) {
205 const toOmit = [ 'label', 'timestamp', 'level', 'message', 'sql', 'tags' ] 205 const toOmit = [ 'label', 'timestamp', 'level', 'message', 'sql', 'tags' ]
206 206
207 return omit(info, ...toOmit) 207 return omit(info, toOmit)
208} 208}