承接 kombyte/simple-logger 相关项目开发

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

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

kombyte/simple-logger

最新稳定版本:v1.1.0

Composer 安装命令:

composer require kombyte/simple-logger

包简介

Simple PSR logger for PHP

README 文档

README

Installation

composer require kombyte/simple-logger

Usage

use SimpleLogger\Logger;
use SimpleLogger\streams\{CollectionStream, FileStream, StdoutStream};

$logger = new Logger(stream: new CollectionStream([
    new StdoutStream(),
    FileStream::async(__DIR__ . '/log.log'),
]));

$logger->debug('The debug message');

Creating a new stream

A stream is a class that implements the SimpleLogger\streams\LogStream interface. You can create your own stream by implementing the write method.

use SimpleLogger\streams\LogStream;

class MyStream implements LogStream
{
    public function write(LogResult $message): void
    {
        // Write the message
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-03