jeremyharris/psr3-papertrail 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

jeremyharris/psr3-papertrail

Composer 安装命令:

composer require jeremyharris/psr3-papertrail

包简介

PSR-3 logger for Papertrail

README 文档

README

Build Status codecov Packagist license

PSR-3 Papertrail Logger

This is a PSR-3 compatible logger that logs to Papertrail.

Installation

composer require jeremyharris/psr3-papertrail

To log to Papertrail, you must define the following constants with your Papertrail credentials:

  • PAPERTRAIL_HOST: Your Papertrail host
  • PAPERTRAIL_PORT: Your Papertrail port

Usage

define('PAPERTRAIL_HOST', 'example.papertrailapp.com');
define('PAPERTRAIL_PORT', 1234);

$logger = new \JeremyHarris\Papertrail\Logger;
$logger->log('error', 'An error occured');

For more information about PSR-3 logging, visit the PSR-3 recommendation. This package contains the \Psr\Log\LogLevel class for friendly log level constants.

Note: Logs are transported over UDP and are therefore fast but fail silently.

Context Options

While no context options are required, you can pass a program and hostname to manually define them.

  • string $program: Program to use. Uses 'logger' by default.
  • string $hostname: Hostname to use. Uses gethostname() by default
  • string $facility: Facility to use. Uses local0 (16) by default. See RFC 3164 for details

This code was mostly taken from the Papertrail docs and this gist.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固