当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Brolog.verbose方法代码示例

本文整理汇总了TypeScript中brolog.Brolog.verbose方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Brolog.verbose方法的具体用法?TypeScript Brolog.verbose怎么用?TypeScript Brolog.verbose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在brolog.Brolog的用法示例。


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

示例1: load

 public load() {
   const text = this.obj.text.join(', ')
   log.verbose('Talker', 'load(%s)', text)
   this.obj.text = []
   this.obj.time = []
   return text
 }
开发者ID:miggame,项目名称:wechaty,代码行数:7,代码来源:api-ai-bot.ts

示例2: say

 public async say() {
   log.verbose('Talker', 'say()')
   const text  = this.load()
   await this.thinker(text)
   .then(reply => this.emit('say', reply))
   this.timer = undefined
 }
开发者ID:miggame,项目名称:wechaty,代码行数:7,代码来源:api-ai-bot.ts

示例3: updateTimer

  public updateTimer(delayTime?: number) {
    delayTime = delayTime || this.delayTime()
    log.verbose('Talker', 'updateTimer(%s)', delayTime)

    if (this.timer) { clearTimeout(this.timer) }
    this.timer = setTimeout(this.say.bind(this), delayTime, 3)
  }
开发者ID:miggame,项目名称:wechaty,代码行数:7,代码来源:api-ai-bot.ts

示例4: canActivate

  canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
    this.log.verbose('AuthGuardService', 'canActivate(%s)', state.url)
    if (this.authService.loggedIn) {
      this.log.verbose('AuthGuardService', 'canActivate() YES')
      return true
    }

    this.log.verbose('AuthGuardService', 'canActivate() NO')

    // Store the attempted URL for redirecting
    this.authService.redirectUrl = state.url

    // Navigate to the login page
    this.router.navigate(['/login'])
    return false
  }
开发者ID:zixia,项目名称:wechaty-app,代码行数:16,代码来源:auth-guard.service.ts

示例5: constructor

 constructor(
   private authService: AuthService
   , private router: Router
   , private log: Brolog
 ) {
   log.verbose('AuthGuardService', 'constructor()')
 }
开发者ID:zixia,项目名称:wechaty-app,代码行数:7,代码来源:auth-guard.service.ts

示例6: doLog

 doLog(logger: Brolog | typeof Brolog, loggerName: string) {
   logger.error('LogApp', 'error messsage from %s', loggerName)
   logger.warn('LogApp', 'warn message from %s', loggerName)
   logger.info('LogApp', 'info message from %s', loggerName)
   logger.verbose('LogApp', 'verbose message from %s', loggerName)
   logger.silly('LogApp', 'silly message from %s', loggerName)
 }
开发者ID:zixia,项目名称:brolog-angular-demo,代码行数:7,代码来源:main.ts

示例7: doLog

function doLog() {
  log.error('LogApp', 'error')
  log.warn('LogApp', 'warn')
  log.info('LogApp', 'info')
  log.verbose('LogApp', 'verbose')
  log.silly('LogApp', 'silly')
}
开发者ID:zixia,项目名称:brolog,代码行数:7,代码来源:smoke-testing.ts

示例8: constructor

 constructor(
   thinker: (text: string) => Promise<string>,
 ) {
   log.verbose('Talker()')
   super()
   this.thinker = thinker
   this.obj = {
     text: [],
     time: [],
   }
 }
开发者ID:miggame,项目名称:wechaty,代码行数:11,代码来源:api-ai-bot.ts

示例9: constructor

  // private sourceCode: string

  /**
   *
   * Brolog & Angular STEP 2: @Inject(Brolog)
   *
   */
  // @Injectable()
  constructor(
    /* @Inject(Brolog) */ private log: Brolog
  ) {
    /**
     *
     * Brolog & Angular STEP 3: use it like Npmlog!
     *
     */
    log.verbose('LogApp', 'constructor()')

    /**
     *
     * this message `THIS_MESSAGE_MEANS_BROLOG_ANGULAR_GOOD`
     * is used by brolog End to End test:
     * https://github.com/zixia/brolog/tree/master/test/e2e
     *
     */
    log.error('LogApp', 'THIS_MESSAGE_MEANS_BROLOG_ANGULAR_GOOD')

    console.log('######### start doLog with Level: %s #########', log.level())
    this.doLog(log, 'Brolog')
    console.log('######### end doLog with Level: %s #########', log.level())
  }
开发者ID:zixia,项目名称:brolog-angular-demo,代码行数:31,代码来源:main.ts

示例10: hear

 public hear(text: string) {
   log.verbose('Talker', `hear(${text})`)
   this.save(text)
   this.updateTimer()
 }
开发者ID:miggame,项目名称:wechaty,代码行数:5,代码来源:api-ai-bot.ts


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