CLI应用程序的花哨logger

网友投稿 582 2022-10-14

CLI应用程序的花哨logger

CLI应用程序的花哨logger

log-horizon

Install

yarn add log-horizon

Usage

const LogHorizon = require('log-horizon')const logger = new LogHorizon()

Check out the example code, preview:

API

new LogHorizon(options)

options

options.logLevel

Type: number Default: 3

1: error2: warn3: info4: debug

options.logUpdate

Type: boolean Default: true

Use log-update module instead of console.log.

options.statusType

Type: string Default: 'emoji' Possible values: 'emoji' 'badge' 'text'

Methods

logger.setOptions(options)

logger.success(message)

logger.error(message)

logger.warn(message)

logger.debug(message)

logger.progress(message)

logger.log(message, update = false)

logger.status(status, message, update = false)

Contributing

Fork it!Create your feature branch: git checkout -b my-new-featureCommit your changes: git commit -am 'Add some feature'Push to the branch: git push origin my-new-featureSubmit a pull request :D

Author

log-horizon © egoist, Released under the MIT License. Authored and maintained by egoist with help from contributors (list).

github.com/egoist · GitHub @egoist · Twitter @_egoistlily

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:集合框架_ArrayList存储自定义对象并排序案例
下一篇:fuzzdb- 应用程序模糊测试
相关文章

 发表评论

暂时没有评论,来抢沙发吧~