rekurzia/yii2-papertrail-log-target

Minimal implementation of Yii2 log target sending messages to Papertrail

Maintainers

πŸ‘ ujovlado

Package info

github.com/rekurzia/yii2-papertrail-log-target

pkg:composer/rekurzia/yii2-papertrail-log-target

Statistics

Installs: 9 729

Dependents: 1

Suggesters: 0

Stars: 3

Open Issues: 0

v0.10.0 2017-01-22 18:53 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 72aba17659587dc8f5fa30db1a4bb3945ede811a

  • VladimΓ­r KriΕ‘ka <ujovlado.woop@gmail.com>

logyii2targetpapertrail

This package is not auto-updated.

Last update: 2026-06-21 09:58:37 UTC


README

πŸ‘ Build Status
πŸ‘ Latest Stable Version
πŸ‘ Total Downloads
πŸ‘ License

Yii2 log target which sends log messages to Papertrail.

Installation

composer require rekurzia/yii2-papertrail-log-target

Usage

Add new target to your configuration:

$config['components']['log']['targets'] = [
 [
 'class' => Rekurzia\Log\PapertrailTarget::class,
 'levels' => ['error', 'warning'],
 'host' => 'logs[xxx].papertrailapp.com',
 'port' => '1234',
 'additionalPrefix' => function() {
 return Yii::$app->id;
 },
 ],
];

Configuration options

host and port

Host and port of your Papertrail log destination.

additionalPrefix

Optional. A PHP callable which allows you to add additional prefix. Useful when [ip][userI][sessionId] is not enough. Setting as in example above, additional prefix [yourApplicationId] will be added.

includeContextMessage

Optional. Whether to include also context message. Defaults to false.

Sample output

πŸ‘ Sample output screenshot

Usage of additionalPrefix highlighted.

License

MIT. See license file.