huan / brolog

Logger for AngularJS in Browser like Npmlog
https://huan.github.io/brolog
Apache License 2.0
10 stars 1 forks source link

Brolog as a EventEmitter #145

Open huan opened 3 years ago

huan commented 3 years ago

For the maximum flexibility for the end-users for displaying the log messages, we plan to emit the log message as an event named loglevel.

For example:

log.on('verbose', (module, method, message) => {
  // filter module & method at here, and output whatever you want.
})

See: https://github.com/wechaty/wechaty-puppet-service/issues/152