2017 © Pedro Peláez
 

library papertrail

Let you log in your papertrai log server

image

port-adhoc/papertrail

Let you log in your papertrai log server

  • Saturday, March 31, 2018
  • by khalyomede
  • Repository
  • 1 Watchers
  • 0 Stars
  • 33 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 3 % Grown

The README.md

Warning

This package is abandoned for a more reliable, standardized and tested package. Please refer to khalyomede/syslog as an alternative as this package will now loose its support., (*1)

papertrail-php

Let you log in your papertrail log server, (*2)

Packagist, (*3)

Requirements

  • You will need to activate the php_sockets extension by uncommenting the line in the php.ini file.
  • You will need to use Composer for this package.

Installation

Execute composer require port-adhoc/papertrail from the prompt command in your project folder., (*4)

Examples

Example of usage 1 : basic example

require( __DIR__ . '/vendor/autoload.php' );

use PortAdhoc\Papertrail;

Papertrail::host('example.papertrailapp.com')
  ->port(123456)
  ->facility(99)
  ->program('cron')
  ->component('spam-cleaning')
  ->message('hello world')
  ->severity( Papertrail::SEVERITY_DEBUG )
  ->send();

Refer to the Severity levels constants list for more severity levels., (*5)

back to the example list, (*6)

Example of usage 2 : sending multiple message in one script

require( __DIR__ . '/vendor/autoload.php' );

use PortAdhoc\Papertrail;

Papertrail::host('example.papertrailapp.com')
  ->port(123456)
  ->facility(99)
  ->program('cron')
  ->component('spam-cleaning');

// a few moments later

Papertrail::message('fetching table done')
  ->severity( Papertrail::SEVERITY_DEBUG )
  ->send();

// an eternity later

Papertrail::message('cleaning table done')
  ->severity( Papertrail::SEVERITY_DEBUG )
  ->send();

Refer to the Severity levels constants list for more severity levels., (*7)

back to the example list, (*8)

Known issues

Timezone error

If you ran into a similar error :, (*9)

It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.

Please use date_default_timezone_set() to globally set your timezone., (*10)

Severity levels constants list

  • Papertrail::SEVERITY_EMERGENCY
  • Papertrail::SEVERITY_ALERT
  • Papertrail::SEVERITY_CRITICAL
  • Papertrail::SEVERITY_ERROR
  • Papertrail::SEVERITY_WARNING
  • Papertrail::SEVERITY_NOTICE
  • Papertrail::SEVERITY_INFORMATIONAL
  • Papertrail::SEVERITY_DEBUG

The Versions

31/03 2018

dev-master

9999999-dev

Let you log in your papertrai log server

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Port Adhoc

16/11 2017

v1.0.7

1.0.7.0

Let you log in your papertrai log server

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Port Adhoc

23/10 2017

v1.0.6

1.0.6.0

Let you log in your papertrai log server

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Port Adhoc

20/10 2017

v1.0.5

1.0.5.0

Let you log in your papertrai log server

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Port Adhoc

20/10 2017

v1.0.4

1.0.4.0

Let you log in your papertrai log server

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Port Adhoc

20/10 2017

v1.0.3

1.0.3.0

Let you log in your papertrai log server

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Port Adhoc

06/10 2017

v1.0.2

1.0.2.0

Let you log in your papertrai log server

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Port Adhoc

06/10 2017

v1.0.1

1.0.1.0

Let you log in your papertrai log server

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Port Adhoc

06/10 2017

v1.0.0

1.0.0.0

Let you log in your papertrai log server

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Port Adhoc