本文整理汇总了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
}
示例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
}
示例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)
}
示例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
}
示例5: constructor
constructor(
private authService: AuthService
, private router: Router
, private log: Brolog
) {
log.verbose('AuthGuardService', 'constructor()')
}
示例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)
}
示例7: doLog
function doLog() {
log.error('LogApp', 'error')
log.warn('LogApp', 'warn')
log.info('LogApp', 'info')
log.verbose('LogApp', 'verbose')
log.silly('LogApp', 'silly')
}
示例8: constructor
constructor(
thinker: (text: string) => Promise<string>,
) {
log.verbose('Talker()')
super()
this.thinker = thinker
this.obj = {
text: [],
time: [],
}
}
示例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())
}
示例10: hear
public hear(text: string) {
log.verbose('Talker', `hear(${text})`)
this.save(text)
this.updateTimer()
}