mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-30 21:04:59 +00:00
refactor(monorepo): decouple api and webui into workspaces packages
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import pino from 'pino'
|
||||
|
||||
const LOG_LEVEL = process.env.LOG_LEVEL || 'info'
|
||||
const LOG_FORMAT = process.env.LOG_FORMAT || 'json'
|
||||
|
||||
const transport =
|
||||
LOG_FORMAT === 'console'
|
||||
? {
|
||||
target: 'pino-pretty',
|
||||
options: {
|
||||
colorize: true,
|
||||
},
|
||||
}
|
||||
: undefined
|
||||
|
||||
export const logger = pino({
|
||||
level: LOG_LEVEL,
|
||||
transport,
|
||||
})
|
||||
Reference in New Issue
Block a user