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


TypeScript Brolog.info方法代码示例

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


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

示例1: 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

示例2: talk

.on('message', async m => {
  if (m.self()) { return }

  // co(function* () {
  //   const msg = yield m.load()
  const room = m.room()

  if (room && /Wechaty/i.test(await room.topic())) {
    log.info('Bot', 'talk: %s'  , m)
    talk(m)
  } else {
    log.info('Bot', 'recv: %s'  , m)
  }
  // })
  // .catch(e => log.error('Bot', 'on message rejected: %s' , e))
})
开发者ID:miggame,项目名称:wechaty,代码行数:16,代码来源:api-ai-bot.ts

示例3: 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

示例4: function

        .on('response', function(response: any) {
          console.log(response)
          /*
{ id: 'a09381bb-8195-4139-b49c-a2d03ad5e014',
  timestamp: '2016-05-27T17:22:46.597Z',
  result:
   { source: 'domains',
     resolvedQuery: 'hi',
     action: 'smalltalk.greetings',
     parameters: { simplified: 'hello' },w
     metadata: {},
     fulfillment: { speech: 'Hi there.' },
     score: 0 },
  status: { code: 200, errorType: 'success' } }
          */
          const reply: string = response.result.fulfillment.speech
          if (!reply) {
            log.info('ApiAi', `Talker do not want to talk for "${text}"`)
            return reject()
          }
          log.info('ApiAi', 'Talker reply:"%s" for "%s" ', reply, text)
          return resolve(reply)
        })
开发者ID:miggame,项目名称:wechaty,代码行数:23,代码来源:api-ai-bot.ts

示例5:

.on('logout' , user => log.info('Bot', 'bot %s logout.', user))
开发者ID:miggame,项目名称:wechaty,代码行数:1,代码来源:api-ai-bot.ts

示例6: Brolog

/**
 *   Wechaty - https://github.com/chatie/wechaty
 *
 *   @copyright 2016-2018 Huan LI <zixia@zixia.net>
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 *
 */
import { Brolog } from 'brolog'

const brolog = new Brolog()
brolog.info('OK', 'with-import.ts')
开发者ID:KiddoLin,项目名称:wechaty,代码行数:22,代码来源:with-import.ts


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