定制 andrey-helldar/laravel-logger-channels 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

andrey-helldar/laravel-logger-channels

Composer 安装命令:

composer require andrey-helldar/laravel-logger-channels

包简介

Set of custom loggers for Monolog in Laravel

README 文档

README

Laravel Logger Channels

Laravel Logger Channels

Set of custom loggers for Monolog in Laravel.

Logger Channels

Total Downloads Latest Stable Version License

Installation

To get the latest version of Laravel Logger Channels, simply require the project using Composer:

$ composer require andrey-helldar/laravel-logger-channels

This command will automatically install the latest version of the package for your environment.

Instead, you may of course manually update your require block and run composer update if you so choose:

{
    "require": {
        "andrey-helldar/laravel-logger-channels": "^1.2"
    }
}

Using

There are two methods for using custom loggers - calling a class with a settings preset or manually setting a logger.

Processes Rotation

Add a new channel in file config/logging.php or modify an existing one using one of the following methods:

use Helldar\LaravelLoggerChannels\Loggers\ProcessesRotation\DifferentLogsChannel;

return [
    'channels' => [
        'your_channel' => DifferentLogsChannel::get(
            storage_path('logs/your-filename.log')
        )
    ]
];
use Helldar\LaravelLoggerChannels\Loggers\Common\LogFormatter;
use Helldar\LaravelLoggerChannels\Loggers\ProcessesRotation\Logger;

return [
    'channels' => [
        'your_channel' => [
            'driver' => 'custom',
            'via'    => Logger::class,
            'tap'    => [LogFormatter::class],
            'path'   => storage_path('logs/your-filename.log'),
            'days'   => 7,
        ]
    ]
];

In each case, one log file will be created for one session. The session label is taken from the global variable LARAVEL_START.

image

License

This package is licensed under the MIT License.

For Enterprise

Available as part of the Tidelift Subscription.

The maintainers of andrey-helldar/laravel-logger-channels and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. Learn more.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固