本文整理匯總了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
}