定制 mintware-de/rotation-logger 二次开发

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

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

mintware-de/rotation-logger

最新稳定版本:v1.0.0

Composer 安装命令:

composer require mintware-de/rotation-logger

包简介

A PSR-3 implementation with rotation support.

README 文档

README

A PSR-3 Logger implementation that supports rollover.

Installation

composer require mintware-de/rotation-logger

Usage

<?php

use MintwareDe\RotationLogger\Rotation\RotateOptions;
use MintwareDe\RotationLogger\RotationLogger;

require_once __DIR__ . '/vendor/autoload.php';

$logger = RotationLogger::create(
    '/var/log/my-log-file',
    new RotateOptions(
        size: 10 * 1_024 * 1_024, // 10 MB; size in bytes
        rotate: 1, // Create 1 rollover file
    ),
);

$logger->debug('foo');

You can also use the default constructor of the RotationLogger class if you need to overwrite other classes. Take a look in the RotationLogger::create() method if you need guidance.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-14