定制 prinx/notify 二次开发

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

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

prinx/notify

最新稳定版本:v0.1.0

Composer 安装命令:

composer require prinx/notify

包简介

Simple log package

README 文档

README

PHP Notify

Simple log package.

Installation

composer require prinx/notify

Usage

$logger = new Log($file);
$logger->info('User 1 has logged in.');

Log Levels

  • debug
  • info
  • notice
  • warning
  • error
  • critical
  • alert
  • emergency

Each log level corresponds to a method to log a message at that level.

$logger->debug('Debug level event has happened.');

$logger->info('Info level event has happened.');

$logger->notice('Notice level event has happened.');

$logger->warning('Warning level event has happened.');

$logger->error('Error level event has happened.');

$logger->critical('Critical level event has happened.');

$logger->alert('Alert level event has happened.');

$logger->emergency('Emergency level event has happened.');

Set another log file

$logger->setFile('path/to/log/file');

Remove log file

$logger->remove();

Fluent interface

The package implements the Fluent interface, allowing you to chain the methods of the logger.

// Eg:
$logger->info('User logged in')
    ->setFile('error.log')
    ->error('An error happened.');

Running tests

vendor/bin/phpunit

Contribute

The package supports only files. It will be nice to add other log dirvers.

Apart from that, feel free to create a pull request with a new functionality to the package.

Licence

MIT

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固