PHPackages                             port-adhoc/papertrail - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. port-adhoc/papertrail

Abandoned → [khalyomede/syslog](/?search=khalyomede%2Fsyslog)Library[Logging &amp; Monitoring](/categories/logging)

port-adhoc/papertrail
=====================

Let you log in your papertrai log server

v1.0.7(8y ago)045MITPHPPHP &gt;=5.3.0

Since Oct 6Pushed 8y ago1 watchersCompare

[ Source](https://github.com/port-adhoc/papertrail-php)[ Packagist](https://packagist.org/packages/port-adhoc/papertrail)[ RSS](/packages/port-adhoc-papertrail/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (9)Used By (0)

Warning
=======

[](#warning)

This package is abandoned for a more reliable, standardized and tested package. Please refer to [khalyomede/syslog](https://github.com/khalyomede/syslog) as an alternative as this package will now loose its support.

papertrail-php
==============

[](#papertrail-php)

Let you log in your papertrail log server

![Packagist](https://camo.githubusercontent.com/65592e2d9b6fb82fa0fc137c20400c97433deff01b66a74f027237b9876c932f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706f72742d6164686f632f7061706572747261696c2e737667)

Requirements
------------

[](#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
------------

[](#installation)

Execute `composer require port-adhoc/papertrail` from the prompt command in your project folder.

Examples
--------

[](#examples)

- [Example of usage 1 : basic example](#example-of-usage-1--basic-example)
- [Example of usage 2 : sending multiple message in one script](#example-of-usage-2--sending-multiple-message-in-one-script)

### Example of usage 1 : basic example

[](#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](#severity-levels-constants-list) for more severity levels.

[back to the example list](#examples)

### Example of usage 2 : sending multiple message in one script

[](#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](#severity-levels-constants-list) for more severity levels.

[back to the example list](#examples)

Known issues
------------

[](#known-issues)

- [Timezone error](#timezone-error)

### Timezone error

[](#timezone-error)

If you ran into a similar error :

```
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()`](http://php.net/manual/en/function.date-default-timezone-set.php) to globally set your timezone.

Severity levels constants list
------------------------------

[](#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`

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 55% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

8

Last Release

3098d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15908747?v=4)[Anwar](/maintainers/khalyomede)[@khalyomede](https://github.com/khalyomede)

---

Top Contributors

[![khalyomede](https://avatars.githubusercontent.com/u/15908747?v=4)](https://github.com/khalyomede "khalyomede (11 commits)")[![port-adhoc2](https://avatars.githubusercontent.com/u/32571986?v=4)](https://github.com/port-adhoc2 "port-adhoc2 (9 commits)")

---

Tags

cronlogpapertrailphpsocketsyslog

### Embed Badge

![Health badge](/badges/port-adhoc-papertrail/health.svg)

```
[![Health](https://phpackages.com/badges/port-adhoc-papertrail/health.svg)](https://phpackages.com/packages/port-adhoc-papertrail)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
