本文整理汇总了TypeScript中winston.Logger.verbose方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Logger.verbose方法的具体用法?TypeScript Logger.verbose怎么用?TypeScript Logger.verbose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类winston.Logger
的用法示例。
在下文中一共展示了Logger.verbose方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: stopped
const shutdown = (signal: string) => {
logger.verbose('Server is shutting down...');
db.close();
logger.verbose('Database connection closed...');
server.close((e: any) => {
if (e) {
logger.error(e);
process.exit(1);
}
logger.warn(`Server stopped (${signal}).`);
process.exit();
});
};
示例2: shutdown
process.on('SIGTERM', () => {
logger.verbose('Got SIGTERM. Server shutdown started.');
shutdown('SIGTERM');
});
示例3: Koa
import constants from './constants';
import config from './config';
import router from './routes';
import db from './db';
const logger = new winston.Logger({
transports: [
new winston.transports.Console({
json: false,
timestamp: true,
level: config.log.level
})
]
});
logger.verbose('Starting with configuration', config);
const app = new Koa();
app.use(compress());
app.use(cors);
app.use(logging(logger));
app.use(bodyParser());
app.use(router.routes());
const server = http.createServer(app.callback());
server.setTimeout(constants.socketLifetime);
db.connect(config.db.url, config.db.name, config.db.options)
.then(() => server.listen(config.app.port as number, config.app.ip))
.then(() => logger.verbose(`Listening on port ${config.app.port}`))
示例4:
.then(() => logger.verbose(`Listening on port ${config.app.port}`))
示例5: parse
verbose: (message: string, ...args: any[]) => logger.verbose(format(scope, message), parse(args)),