@@ -69,8 +69,8 @@ |
||
69 | 69 | public function write(\core\event\base $event) { |
70 | 70 | $curl = new \curl(); |
71 | 71 | $url = $this->get_config('fluentd_url', 'http://localhost') . ':' . |
72 | - $this->get_config('fluentd_port', 8888) . '/' . |
|
73 | - $this->get_config('fluentd_tag', 'fluentd.moodle') . '/?time='.$event->timecreated; |
|
72 | + $this->get_config('fluentd_port', 8888) . '/' . |
|
73 | + $this->get_config('fluentd_tag', 'fluentd.moodle') . '/?time='.$event->timecreated; |
|
74 | 74 | $curl->post($url, 'json='.json_encode((array)$event)); |
75 | 75 | } |
76 | 76 |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | |
28 | 28 | global $CFG; |
29 | 29 | |
30 | -require_once($CFG->dirroot.'/admin/tool/log/store/fluentd/vendor/autoload.php'); |
|
31 | -require_once($CFG->dirroot.'/lib/filelib.php'); |
|
30 | +require_once($CFG->dirroot . '/admin/tool/log/store/fluentd/vendor/autoload.php'); |
|
31 | +require_once($CFG->dirroot . '/lib/filelib.php'); |
|
32 | 32 | |
33 | 33 | use Fluent\Autoloader, |
34 | 34 | Fluent\Logger\FluentLogger; |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | defined('MOODLE_INTERNAL') || die(); |
39 | 39 | |
40 | 40 | |
41 | -class store implements \tool_log\log\writer { |
|
41 | +class store implements \tool_log\log\writer { |
|
42 | 42 | use \tool_log\helper\store, |
43 | 43 | \tool_log\helper\reader; |
44 | 44 | |
@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | $curl = new \curl(); |
71 | 71 | $url = $this->get_config('fluentd_url', 'http://localhost') . ':' . |
72 | 72 | $this->get_config('fluentd_port', 8888) . '/' . |
73 | - $this->get_config('fluentd_tag', 'fluentd.moodle') . '/?time='.$event->timecreated; |
|
74 | - $curl->post($url, 'json='.json_encode((array)$event)); |
|
73 | + $this->get_config('fluentd_tag', 'fluentd.moodle') . '/?time=' . $event->timecreated; |
|
74 | + $curl->post($url, 'json=' . json_encode((array)$event)); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |