mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
refactor: ```
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
import util from './util.js'
|
||||
import log4js from 'log4js'
|
||||
import path from 'path'
|
||||
const level = process.env.NODE_ENV === 'development' ? 'debug' : 'info'
|
||||
const filename = path.join(util.getUserBasePath(), '/logs/certd.log')
|
||||
log4js.configure({
|
||||
appenders: { std: { type: 'stdout' }, file: { type: 'file', pattern: 'yyyy-MM-dd', daysToKeep: 3, filename } },
|
||||
categories: { default: { appenders: ['file', 'std'], level: level } }
|
||||
appenders: { std: { type: 'stdout' } },
|
||||
categories: { default: { appenders: ['std'], level: 'info' } }
|
||||
})
|
||||
const logger = log4js.getLogger('certd')
|
||||
export default logger
|
||||
|
||||
Reference in New Issue
Block a user