mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 13:48:02 +00:00
chore: 将部分通用变量移动到utils.ts
This commit is contained in:
parent
78ba547138
commit
48869266e4
10 changed files with 24 additions and 33 deletions
|
|
@ -7,12 +7,14 @@
|
|||
|
||||
import log from 'electron-log'
|
||||
import pc from 'picocolors'
|
||||
import { isDev } from './utils'
|
||||
|
||||
Object.assign(console, log.functions)
|
||||
log.variables.process = 'main'
|
||||
log.transports.console.format = `[{process}] ${pc.dim(
|
||||
'{h}:{i}:{s}{scope}'
|
||||
)} {level} › {text}`
|
||||
if (log.transports.ipc) log.transports.ipc.level = false
|
||||
log.transports.console.format = `${
|
||||
isDev ? '' : pc.dim('{h}:{i}:{s}{scope} ')
|
||||
}{level} › {text}`
|
||||
log.transports.file.level = 'info'
|
||||
|
||||
log.info(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue