承接 bayfrontmedia/monolog-pdo 相关项目开发

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

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

bayfrontmedia/monolog-pdo

最新稳定版本:v1.1.0

Composer 安装命令:

composer require bayfrontmedia/monolog-pdo

包简介

Monolog handler used to write log files to a MySQL database.

README 文档

README

Monolog handler used to write log files to a MySQL database.

License

This project is open source and available under the MIT License.

Author

Bayfront Media

Requirements

  • PHP >= 8.0 (Tested up to 8.4)
  • PDO PHP extension

Installation

composer require bayfrontmedia/monolog-pdo

Usage

Before pushing this handler to a Logger instance, you must first create the necessary database table to store the records.

The table can be created using the up method, and removed using the down method.

The constructor requires a PDO instance, and the table name you wish to use:

use Bayfront\MonologPDO\PDOHandler;

/** @var PDO $pdo */
$handler = new PDOHandler($pdo, 'table_name');

$handler->up();

Once the table has been created, the handler can be pushed to a Logger instance:

use Bayfront\MonologPDO\PDOHandler;
use Monolog\Logger;

$log = new Logger('channel_name');

/** @var PDO $pdo */
$handler = new PDOHandler($pdo, 'table_name');

$log->pushHandler($handler);

From here, your log records should appear in the MySQL table.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固