2017 © Pedro Peláez
 

library psr3-papertrail

PSR-3 logger for Papertrail

image

jeremyharris/psr3-papertrail

PSR-3 logger for Papertrail

  • Sunday, September 17, 2017
  • by jeremyharris
  • Repository
  • 1 Watchers
  • 0 Stars
  • 619 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Build Status codecov Packagist license, (*1)

PSR-3 Papertrail Logger

This is a PSR-3 compatible logger that logs to Papertrail., (*2)

Installation

composer require jeremyharris/psr3-papertrail

To log to Papertrail, you must define the following constants with your Papertrail credentials:, (*3)

  • 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., (*4)

Note: Logs are transported over UDP and are therefore fast but fail silently., (*5)

Context Options

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

  • 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][4] gist., (*7)

The Versions

17/09 2017

dev-master

9999999-dev

PSR-3 logger for Papertrail

  Sources   Download

MIT

The Requires

 

The Development Requires

psr-3 papertrail

03/06 2017

1.0.1

1.0.1.0

PSR-3 logger for Papertrail

  Sources   Download

MIT

The Requires

 

The Development Requires

psr-3 papertrail

03/06 2017

1.0.0

1.0.0.0

PSR-3 logger for Papertrail

  Sources   Download

MIT

The Requires

 

The Development Requires

psr-3 papertrail