diff --git a/readme.md b/readme.md index 0104d42..7b49b08 100644 --- a/readme.md +++ b/readme.md @@ -16,7 +16,7 @@ composer require rekurzia/yii2-papertrail-log-target ## Usage -Add Sentry target to your configuration +Add new target to your configuration: ```php $config['components']['log']['targets'] = [ @@ -24,11 +24,29 @@ $config['components']['log']['targets'] = [ 'class' => Rekurzia\Log\PapertrailTarget::class, 'levels' => ['error', 'warning'], 'host' => 'logs[xxx].papertrailapp.com', - 'port' => 1234, + '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`. + ## License MIT. See [license.txt](license.txt) file.