本文整理汇总了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;未经允许,请勿转载。 |
请发表评论