# logsets **Repository Path**: zhangfisher/logsets ## Basic Information - **Project Name**: logsets - **Description**: 编写具有丰富表现力的nodejs命令行终端程序的库 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 44 - **Forks**: 8 - **Created**: 2022-01-26 - **Last Updated**: 2025-06-12 ## Categories & Tags **Categories**: javascript-toolkits **Tags**: logger ## README 为开发`nodejs`命令行程序提供丰富的表现输出样式,支持以下特性: - 支持按不同数据类型以不同的颜色显示,并且可以配置显示样式 - 支持按`DEBUG`、`INFO`、`WARN `、`ERROR `、`FATAL`五个级别输出日志 - 支持输出带颜色的模板字符串 - 支持自动格式化显示`{}`和`[]`类型 - 支持强大的表格输出 - 支持输出任务列表、进度条、横幅和树等扩展 - 正确处理中文与英文混排时的对齐问题 - 提供任务执行列表显示 # **开源推荐:** - **`VoerkaI18n`**: [基于Nodejs/React/Vue的一键国际化解决方案](https://zhangfisher.github.io/voerka-i18n/) - **`Logsets`**: [命令行应用增强输出库](https://zhangfisher.github.io/logsets/) - **`FlexDecorators`**: [JavaScript/TypeScript装饰器开发](https://zhangfisher.github.io/flex-decorators/) - **`FlexState`**: [有限状态机实现]](https://zhangfisher.github.io/flexstate/) - **`AutoPub`**: [基于pnpm/monorepo的自动发包工具](https://zhangfisher.github.io/autopub/) # 安装 ```shell npm install logsets yarn add logsets pnpm add logsets ``` # 使用文档 访问[官方文档](https://zhangfisher.github.io/logsets/) # 输出效果 - 模板字符串输出 ![image](./docs/guide/images/log.jpg) - 按数据类型输出 ![image](./docs/guide/images/log2.jpg) - 格式化输出对象 ![image](./docs/guide/images/log3.jpg) ![image](./docs/guide/images/log5.jpg) - 输出日志级别 ![image](./docs/guide/images/log11.jpg) - 表格输出 ![image](./docs/guide/images/log6.jpg) ![image](./docs/guide/images/log7.jpg) ![image](./docs/guide/images/log8.jpg) - 进度条 ![](./docs/guide/images/progressbar.png) - 横幅 ![](./docs/guide/images/banner1.png) ![](./docs/guide/images/banner2.png) - 任务列表 ![](./docs/guide/images/tasklist.demo.gif) ![](./docs/guide/images/createTasks.png) - 树 ![](./docs/guide/images/tree1.png) ![](./docs/guide/images/tree2.png) - 列表 ![](./docs/guide/images/list.png)