1. Go to this page and download the library: Download xpohoc269/yii2-graylog library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// short_message will contain string representation of ['test1' => 123, 'test2' => 456],
// no full_message will be sent
Yii::info([
'test1' => 123,
'test2' => 456,
]);
// short_message will contain 'Test short message',
// two additional fields will be sent,
// full_message will contain all other stuff without 'short' and 'add':
// string representation of ['test1' => 123, 'test2' => 456]
Yii::info([
'test1' => 123,
'test2' => 456,
'short' => 'Test short message',
'add' => [
'additional1' => 'abc',
'additional2' => 'def',
],
]);
// short_message will contain 'Test short message',
// two additional fields will be sent,
// full_message will contain 'Test full message', all other stuff will be lost
Yii::info([
'test1' => 123,
'test2' => 456,
'short' => 'Test short message',
'full' => 'Test full message',
'add' => [
'additional1' => 'abc',
'additional2' => 'def',
],
]);
php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.