File tree Expand file tree Collapse file tree 3 files changed +18
-10
lines changed
Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 11import createLogger , { type LoggerOptions } from 'pino' ;
2- import type { PrettyOptions } from 'pino-pretty' ;
32
4- type BotLoggerOptions = LoggerOptions & {
5- transport ?: { target : 'pino-pretty' ; options : PrettyOptions } ;
6- } ;
7-
8- const developmentOptionsOverride : BotLoggerOptions = {
3+ const developmentOptionsOverride : LoggerOptions = {
94 transport : {
10- target : 'pino-pretty' ,
11- options : {
12- colorize : true ,
13- } ,
5+ target : './pinoTransportModule' ,
146 } ,
157 level : process . env [ 'LOGLEVEL' ] ?? 'debug' ,
168} ;
Original file line number Diff line number Diff line change 1+ import { red , white } from 'colorette' ;
2+ import pretty from 'pino-pretty' ;
3+
4+ export default ( opts : Parameters < typeof pretty > ) =>
5+ pretty ( {
6+ ...opts ,
7+ colorize : true ,
8+ messageFormat : white ( `[${ red ( '{module}' ) } ] {msg}` ) ,
9+ hideObject : true ,
10+ ignore : 'pid,hostname' ,
11+ } ) ;
Original file line number Diff line number Diff line change 1+ //eslint-disable-next-line import/no-extraneous-dependencies
12import { defineConfig } from 'tsup' ;
23
34export default defineConfig ( {
45 clean : true ,
6+ entry : {
7+ main : 'src/main.ts' ,
8+ pinoTransportModule : 'src/core/pinoTransportModule.ts' ,
9+ } ,
510 format : [ 'esm' ] ,
611 keepNames : true ,
712 minify : true ,
You can’t perform that action at this time.
0 commit comments