diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-17 15:25:58 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-17 15:25:58 +0200 |
commit | bbd5aa7ead5f1554a0872963f957effc26d8c630 (patch) | |
tree | a32cad420cfabe4eab5df4e3f104fa34f734fa7d /server/helpers | |
parent | a85d530384761a0af833caac9b38b9834517c9fa (diff) | |
download | PeerTube-bbd5aa7ead5f1554a0872963f957effc26d8c630.tar.gz PeerTube-bbd5aa7ead5f1554a0872963f957effc26d8c630.tar.zst PeerTube-bbd5aa7ead5f1554a0872963f957effc26d8c630.zip |
Reimplement a typed omit function
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/logger.ts | 4 |
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 @@ | |||
1 | import { stat } from 'fs-extra' | 1 | import { stat } from 'fs-extra' |
2 | import { omit } from 'lodash' | ||
3 | import { join } from 'path' | 2 | import { join } from 'path' |
4 | import { format as sqlFormat } from 'sql-formatter' | 3 | import { format as sqlFormat } from 'sql-formatter' |
5 | import { createLogger, format, transports } from 'winston' | 4 | import { createLogger, format, transports } from 'winston' |
6 | import { FileTransportOptions } from 'winston/lib/winston/transports' | 5 | import { FileTransportOptions } from 'winston/lib/winston/transports' |
7 | import { context } from '@opentelemetry/api' | 6 | import { context } from '@opentelemetry/api' |
8 | import { getSpanContext } from '@opentelemetry/api/build/src/trace/context-utils' | 7 | import { getSpanContext } from '@opentelemetry/api/build/src/trace/context-utils' |
8 | import { omit } from '@shared/core-utils' | ||
9 | import { CONFIG } from '../initializers/config' | 9 | import { CONFIG } from '../initializers/config' |
10 | import { LOG_FILENAME } from '../initializers/constants' | 10 | import { LOG_FILENAME } from '../initializers/constants' |
11 | 11 | ||
@@ -204,5 +204,5 @@ function removeCyclicValues () { | |||
204 | function getAdditionalInfo (info: any) { | 204 | function 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 | } |