alioth/before/cha/07=logger/app.js
2025-05-30 09:18:01 +08:00

30 lines
895 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// | ------------------------------------------------------------
// | @版本: version 0.1
// | @创建人: 【Nie-x7129】
// | @E-mail: x71291@outlook.com
// | @文件描述: logger | Nodejs的日志记录工具合集包括Winston、pino、log4js
// | @创建时间: 2023-09-15 09:28
// | @更新时间: 2023-09-15 09:28
// | @修改记录:
// | -*-*-*- (时间--修改人--修改说明) -*-*-*-
// | =
// | ------------------------------------------------------------
const winston = require('./src/winston/index')
console.time(1)
winston.fatal('Hello Wrold')
winston.error({time: new Date()},{name:'hexi'},'xsaxasx')
winston.warn('Hello Wrold')
winston.info('Hello Wrold')
winston.debug('Hello Wrold')
winston.trace('Hello Wrold')
console.timeEnd(1)
const obj = {
name:'Nier',
age:25,
sex:1,
muster:"PAC",
role:'保密者',
premier:'ALL'
}
winston.info(obj)