承接 buzzlightyear/colour-logger 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

buzzlightyear/colour-logger

最新稳定版本:v1.1.0

Composer 安装命令:

composer require buzzlightyear/colour-logger

包简介

A powerful, fluent API for colored logging in Laravel applications, built on top of Monolog.

README 文档

README

ColourLogger is a powerful, fluent API for coloured logging in PHP applications, leveraging Monolog to enhance readability and focus during development by adding coloured and styled text capabilities to console logging.

Features

  • Easy integration with any Laravel application.
  • Fluent interface to configure foreground and background colours, as well as text styles such as bold, italic, and underline.
  • Built on top of the robust Monolog logging library.
  • Support for logging complex data types including arrays and objects, with optional pretty-print JSON formatting.

Installation

Install ColourLogger via Composer:

composer require buzzlightyear/colour-logger

Usage

Here is how you can use ColourLogger in your PHP projects:

use App\Logging\ColourLogger;

// Basic usage
ColourLogger::text('blue')->log('This is a blue text');

// Complex styling
ColourLogger::text('blue')->background('red')->bold()->italic()->underline()->log('This message has red background and blue, bold, italic, underlined text');

// Logging complex data types with pretty-print JSON
ColourLogger::text('green')->json()->log(['key' => 'value', 'another_key' => 'another_value']);

Customize Colours

You can easily customize the colours by accessing the colour_map array within the ColourLogger class. Modify this array to include your preferred ANSI colour codes.

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

To contribute to ColourLogger, follow these steps:

  1. Fork the project repository.
  2. Create a new branch (git checkout -b feature/AmazingFeature).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add some AmazingFeature').
  5. Push to the branch (git push origin feature/AmazingFeature).
  6. Open a pull request.

License

Distributed under the MIT License. See LICENSE file for more information.

Contact

Project Link: https://github.com/buzzlightyear1309/colour-logger

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-21