• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript winston.info函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中winston.info函数的典型用法代码示例。如果您正苦于以下问题:TypeScript info函数的具体用法?TypeScript info怎么用?TypeScript info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了info函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: setup

export function setup(router: express.Router) {

    logger.info('Setting up request mapping for for user');
    router.get('/secure/user', (req: any, res: express.Response) => {
        res.json(req.session.passport.user);
    });

    return router;
}
开发者ID:pavan496,项目名称:the-hub,代码行数:9,代码来源:user.ts


示例2: init

 public async init(): Promise<FSWatcher> {
   try {
     logger.info('Starting watcher');
     return this.fswatcher.on('add', this.onAdd.bind(this));
   } catch (err) {
     logger.error(err);
     throw err;
   }
 }
开发者ID:mshick,项目名称:arrivals-osx,代码行数:9,代码来源:fileWatcher.ts


示例3:

			cursor.each(function(err, row) {
				if (err) {
					throw err;
				}
				winston.info('myCategoriesFeed => cursor.each');
                const admins = _.merge(_.get(row, 'old_val.admins', []), _.get(row, 'new_val.admins', []));
				for (let playerId of admins) {
					emit('myCategories:' + playerId + ':feed', JSON.stringify(row));
				}
			});
开发者ID:radotzki,项目名称:bullshit-server,代码行数:10,代码来源:category.socket.ts


示例4: onClose

    /**
	 * Called whenever a client disconnnects
	 */
    private onClose() {
        if ( this.onDisconnected )
            this.onDisconnected( this );

        winston.info( `Websocket disconnected: ${this.domain}`, { process: process.pid } )

        this.ws.removeAllListeners( 'message' );
        this.ws.removeAllListeners( 'close' );
        this.ws.removeAllListeners( 'error' );
    }
开发者ID:Webinate,项目名称:users,代码行数:13,代码来源:client-connection.ts


示例5: handleFile

  private async handleFile(filePath: string): Promise<boolean> {
    logger.info('Taking file: %s', filePath);
    const jobType = this.getJobType(filePath);
    logger.debug('Took %s %s', filePath, jobType);

    // Give directories a chance to write cover files
    // await sleep(1000);

    return this.dispatcher.enqueueFile(filePath, jobType);
  }
开发者ID:mshick,项目名称:arrivals-osx,代码行数:10,代码来源:fileWatcher.ts


示例6: listen

    public listen(...args: any[]) {
        this.port = args[0];
        this.server.listen.apply(this.server, args);
        this.sbc.connect(this.port);

        log.info("Stage listening on port " + this.port + " for resource " +
            this.route);

        // TODO: Add John's hack for getting the current IP here.
    }
开发者ID:hausdorff,项目名称:pipeline,代码行数:10,代码来源:Stage.ts


示例7: handleEcho

 handleEcho(payload: FBTypes.MessengerPayload) {
     logger.info("echo received:", payload);
     
     // keep track of last time we sent anything to this user
     return new Volunteer({ fbid: payload.recipient.id })
     .save(
         { last_messaged: moment().format(DATE_FORMAT) },
         { patch: true, require: false }
     );
 }
开发者ID:CMUBigLab,项目名称:cmuNodeFbot,代码行数:10,代码来源:bot.ts


示例8: function

            this.mailgun.messages().send( { from: from, subject: subject, text: msg, to: to }, function( err, response ) {

                if ( err ) {
                    winston.error( `Could not send email to ${to}: ${err}`, { process: process.pid } );
                    return reject( err );
                }

                winston.info( `Email sent ${JSON.stringify( response )} unmodified`, { process: process.pid } );
                return resolve( true );
            } );
开发者ID:Webinate,项目名称:users,代码行数:10,代码来源:mailgun.ts


示例9: onMessage

    /**
	 * Called whenever we recieve a message from a client
	 */
    private onMessage( message: string ) {
        winston.info( `Received message from client: '${message}'`, { process: process.pid } );
        try {
            const token: def.SocketTokens.IToken = JSON.parse( message );
            this._controller.processServerInstruction( new ServerInstruction( token, this ) );
        }
        catch ( err ) {
            winston.error( `Could not parse socket message: '${err}'`, { process: process.pid } );
        }
    }
开发者ID:Webinate,项目名称:users,代码行数:13,代码来源:client-connection.ts


示例10: function

 }, function( err ) {
     if ( !err ) {
         winston.info( `Modified email sent ${JSON.stringify( response )}`, { process: process.pid } );
         return resolve( true );
     }
     else {
         winston.error( `Could not modify email ${JSON.stringify( response )}: ${err}`, { process: process.pid } );
         return reject( err );
     }
 } );
开发者ID:Webinate,项目名称:users,代码行数:10,代码来源:gmail.ts



注:本文中的winston.info函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript winston.log函数代码示例发布时间:2022-05-25
下一篇:
TypeScript winston.error函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap