承接 jacobemerick/monolog-pqp 相关项目开发

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

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

jacobemerick/monolog-pqp

Composer 安装命令:

composer require jacobemerick/monolog-pqp

包简介

Monolog handler that interfaces with PHP Quick Profiler

README 文档

README

Build Status Code Climate Test Coverage Scrutinizer Code Quality

Monolog handler that interfaces with PHP Quick Profiler

Installation

It's recommended that you use Composer to install MonologPQP Handler.

$ composer require jacobemerick/monolog-pqp

This will install the handler and dependencies. It requires PHP 5.3.0 or newer.

Usage

This is a handler for Monolog that will send logs and exceptions to PHP Quick Profiler. For more information about the profiler see jacobemerick/pqp.

$console = new Particletree\Pqp\Console();
$profiler = new Particletree\Pqp\PhpQuickProfiler();
$profiler->setConsole();

$logger = new Monolog\Logger('web');
$handler = new Jacobemerick\MonologPqp\PqpHandler($console);
$logger->pushHandler($handler);

$logger->addDebug('PQP handler added to Monolog');

The default logging level for this handler is set to Monolog\Logger::DEBUG. For more information about this, or how to customize the format displayed in the profiler, see Seldaek/monolog.

Errors

PHP Quick Profiler handles exceptions separately, displaying more information about them and tagging as 'error'. If you simply do $logger->error() you will log the message but not get the extra sugar. The best way to handle this is by using Monolog as an exception handler.

$logger = new Monolog\Logger('web');
$handler = new Jacobemerick\MonologPqp\PqpHandler($console);
$logger->pushHandler($handler);

Monolog\ErrorHandler::register($logger);
throw new Exception('testing');

This will trigger the logError method in the profiler and display additional data about the problem.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-01-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固