curruwilla/console-pretty-log
Composer 安装命令:
composer require curruwilla/console-pretty-log
包简介
Simple and customizable console log output for CLI apps.
README 文档
README
Simple and customizable console log output for CLI apps.
Highlights
- Simple installation (Instalação simples)
- Very easy to customize text output (Muito fácil de customizar a saída de texto)
- Composer ready and PSR-12 compliant (Pronto para o composer e compatível com PSR-12)
Installation
Uploader is available via Composer:
"curruwilla/console-pretty-log": "^1.0"
or run
composer require curruwilla/console-pretty-log
Documentation
Check the example file.
If you are defining the size of columns, when using textInitial be sure to enter the size as well.
Example:
use ConsolePrettyLog\Background; use ConsolePrettyLog\Color; use ConsolePrettyLog\Font; use ConsolePrettyLog\Line; $line = new Line(); $line->columnsSize([15, 75, 10]); // <-- Use to keep information aligned //$line->separator('-'); <-- Default value: '|' //$line->paddingCharacter(' '); <-- Default value: '.' //$line->enableDate(false); <-- Default value: true //$line->dateFormat("d/m/Y H:i"); <-- Default value: 'Y-m-d H:i:s' //$line->textInitial('LOG', [Color::RED, Font::BOLD]); <-- Include text at the beginning of every line //$line->textInitial('IMPORTANT', [Font::BOLD]); <-- Include text at the beginning of every line $line ->text('Account 1', [Font::BOLD, Font::ITALIC]) ->text('Delivery made successfully', [Color::WHITE]) ->text('Success', [Color::GREEN]) ->print(); $line ->text('Account 2', [Font::BOLD]) ->text('Opps, something went wrong with the delivery, please see the log', [Color::WHITE]) ->text('Error', [Background::RED]) ->print(); $line ->text('Account 3', [Font::BOLD]) ->text('Payment made successfully', [Color::WHITE, Font::ITALIC]) ->text('SUCCESS', [Background::GREEN]) ->print(); $line ->text('Account 1', [Font::BOLD]) ->text('Payment made successfully', [Color::WHITE]) ->text('INFO', [Background::BLUE]) ->print();
Result in CLI:
Enums Options:
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.
curruwilla/console-pretty-log 适用场景与选型建议
curruwilla/console-pretty-log 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.63k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2022 年 07 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「log」 「cli」 「console」 「pretty」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 curruwilla/console-pretty-log 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 curruwilla/console-pretty-log 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 curruwilla/console-pretty-log 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This class provides you with an easy-to-use interface to progress bars.
A Laravel package to retrieve data from Google Search Console
Additional artisan commands for Laravel
A table generator class for the PHP CLI.
Stackdriver handler for Monolog (codeinternetapplications/monolog-stackdriver Fork).
Laravel 5.x.x library for integration Monolog Sentry
统计信息
- 总下载量: 1.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-31

