本文整理汇总了TypeScript中@util.logger.debug方法的典型用法代码示例。如果您正苦于以下问题:TypeScript logger.debug方法的具体用法?TypeScript logger.debug怎么用?TypeScript logger.debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@util.logger
的用法示例。
在下文中一共展示了logger.debug方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: fetchTicker
public async fetchTicker(symbol: string) {
const fn = () => this.exchangeConnection.fetchTicker(symbol)
const res = await this.bottleneck.schedule(fn)
const debug = { name: 'fetchTicker', req: { symbol }, res }
logger.debug(JSON.stringify(debug))
return res
}
示例2: cancelOrder
public async cancelOrder(orderId: string) {
const fn = () => this.exchangeConnection.cancelOrder(orderId)
const res = await this.bottleneck.schedule(fn)
const debug = { name: 'cancelOrder', req: { orderId }, res }
logger.debug(JSON.stringify(debug))
return res
}
示例3: createOrder
public async createOrder(symbol: string, type: string, side: string, amount: number, price: number): Promise<Order> {
const fn = () => this.exchangeConnection.createOrder(symbol, type, side, amount, price)
const res = await this.bottleneck.schedule(fn)
const debug = { name: 'createOrder', req: { symbol, type, side, amount, price }, res }
logger.debug(JSON.stringify(debug))
return res
}
示例4: checkOrder
public async checkOrder(orderId: string): Promise<OrderWithTrades> {
const fn = () => this.exchangeConnection.fetchOrder(orderId)
const res: any = await this.bottleneck.schedule(fn)
const debug = { name: 'checkOrder', req: { orderId }, res }
logger.debug(JSON.stringify(debug))
return res
}
示例5: fetchBalance
public async fetchBalance() {
const fn = () => this.exchangeConnection.fetchBalance()
const res = await this.bottleneck.schedule(fn)
const debug = { name: 'fetchBalance', req: {}, res }
logger.debug(JSON.stringify(debug))
return res
}