本文整理汇总了TypeScript中winston.Logger.handleExceptions方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Logger.handleExceptions方法的具体用法?TypeScript Logger.handleExceptions怎么用?TypeScript Logger.handleExceptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类winston.Logger
的用法示例。
在下文中一共展示了Logger.handleExceptions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: Copyright
along with TPC.js. If not, see <http://www.gnu.org/licenses/>.
*/
/* TypeScript headers */
/// <reference path="../typings/node/node.d.ts" />
var GPLv3Message =
"TPC.js Copyright (C) 2014 Gurjeet Singh, http://gurjeet.singh.im"
+ "\n" + "This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you"
+ "\n" + "are welcome to redistribute it under terms of GNU General Public License version 3.";
var blessed = require('blessed');
var winston = require('winston');
var g_logger = new (winston.Logger)({ exitOnError: false })
g_logger.handleExceptions(new winston.transports.File({ filename: '/tmp/tpcc_exceptions.log' })) /* XXX This doesn't seem to do anything when an exception occurs! */
g_logger.add(winston.transports.File, { filename: uvp_log_file });
g_logger.log('info', 'Beginning TPC-C run.');
/* Create a screen */
/*
* XXX: For some inexplicable reason, if this variable is named 'screen', it
* causes `tsc` to emit an error, and no amount of diagnosis resolved the error.
*
* TODO: Create a definition file for blessed and contribute it to
* DefinitelyTyped repo.
*/
var mainScreen: any = blessed.screen();
/*