ts: lib/logger.js

Signed-off-by: Raccoon <raccoon@hackmd.io>
This commit is contained in:
Raccoon 2021-06-12 07:05:47 +08:00
parent 385ef6940b
commit 2a376db0fc
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38

View File

@ -1,7 +1,10 @@
'use strict'
const { createLogger, format, transports } = require('winston')
import {createLogger, format, transports, Logger} from "winston";
const logger = createLogger({
interface CodiMDLogger extends Logger {
stream: any
}
const logger: CodiMDLogger = createLogger({
level: 'debug',
format: format.combine(
format.uncolorize(),
@ -24,4 +27,4 @@ logger.stream = {
}
}
module.exports = logger
export = logger