rekurzia/yii2-papertrail-log-target
Minimal implementation of Yii2 log target sending messages to Papertrail
Maintainers
Package info
github.com/rekurzia/yii2-papertrail-log-target
pkg:composer/rekurzia/yii2-papertrail-log-target
Requires
- php: ~5.6|~7.0
- ext-sockets: *
- monolog/monolog: ~1.0
- yiisoft/yii2: ~2.0
Requires (Dev)
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT 72aba17659587dc8f5fa30db1a4bb3945ede811a
- VladimΓr KriΕ‘ka <ujovlado.woop@gmail.com>
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
Usage of additionalPrefix highlighted.
License
MIT. See license file.
