2022-03-13 14:40:38 +08:00
|
|
|
|
import { app } from 'electron'
|
|
|
|
|
import logger from 'electron-log'
|
2022-03-29 16:52:53 +08:00
|
|
|
|
import pc from 'picocolors'
|
2022-03-13 14:40:38 +08:00
|
|
|
|
|
2022-03-29 16:52:53 +08:00
|
|
|
|
logger.transports.console.format = `${pc.dim('{h}:{i}:{s}{scope}')} › {text}`
|
2022-03-13 14:40:38 +08:00
|
|
|
|
|
|
|
|
|
logger.transports.file.level = app.isPackaged ? 'info' : 'debug'
|
|
|
|
|
logger.info(
|
2022-03-29 16:52:53 +08:00
|
|
|
|
`\n\n██╗ ██╗███████╗███████╗██████╗ ██╗ █████╗ ██╗ ██╗███╗ ███╗██╗ ██╗███████╗██╗ ██████╗
|
2022-03-13 14:40:38 +08:00
|
|
|
|
╚██╗ ██╔╝██╔════╝██╔════╝██╔══██╗██║ ██╔══██╗╚██╗ ██╔╝████╗ ████║██║ ██║██╔════╝██║██╔════╝
|
|
|
|
|
╚████╔╝ █████╗ ███████╗██████╔╝██║ ███████║ ╚████╔╝ ██╔████╔██║██║ ██║███████╗██║██║
|
|
|
|
|
╚██╔╝ ██╔══╝ ╚════██║██╔═══╝ ██║ ██╔══██║ ╚██╔╝ ██║╚██╔╝██║██║ ██║╚════██║██║██║
|
|
|
|
|
██║ ███████╗███████║██║ ███████╗██║ ██║ ██║ ██║ ╚═╝ ██║╚██████╔╝███████║██║╚██████╗
|
|
|
|
|
╚═╝ ╚══════╝╚══════╝╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝\n`
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
export default logger
|