lorenzo / cakephp-logstash
CakePHP logstash 日志流
dev-master
2017-11-18 16:45 UTC
Requires
This package is auto-updated.
Last update: 2024-08-25 21:39:25 UTC
README
需求
- CakePHP 2.x
- PHP 5.3+
- Composer
安装
本插件仅支持通过 composer 安装。只需将以下内容添加到您的 composer.json 配置文件中:
{
"require" : {
"lorenzo/cakephp-logstash": "master"
}
}
启用插件
您需要在 app/Config/bootstrap.php
文件中启用该插件
CakePlugin::load('Logstash');
最后,在该文件中添加一个新的日志流
CakeLog::config('debug', array(
'engine' => 'Logstash.LogstashLog',
'types' => array('list', 'of', 'type', 'to', 'log'),
'host' => 'tcp://127.0.0.1', // Set it to the real host works with udp too
'port' => 2020, // Set it to the actual port
'timeout' => 5 // Connection timeout
));