Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Issue 229: Make fluentd a suggest requirement rather than mandatory #230

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ $config = array(
?>
```

Also you will have to install a suggested package `fluent/logger`.


### Configuration reference

Expand Down Expand Up @@ -444,7 +446,7 @@ Default: `'rollbar'`

<dt>handler
</dt>
<dd>Either `'blocking'`, `'agent'`, or `'fluent'`. `'blocking'` uses curl to send requests immediately; `'agent'` writes a relay log to be consumed by [rollbar-agent](https://github.com/rollbar/rollbar-agent); `'fluent'` send the requests to a [fluentd](https://www.fluentd.org/) instance.
<dd>Either `'blocking'`, `'agent'`, or `'fluent'`. `'blocking'` uses curl to send requests immediately; `'agent'` writes a relay log to be consumed by [rollbar-agent](https://github.com/rollbar/rollbar-agent); `'fluent'` send the requests to a [fluentd](https://www.fluentd.org/) instance and requires the suggested package `fluent/logger`.

Default: `'blocking'`
</dd>
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@

"require": {
"ext-curl": "*",
"psr/log": "~1.0.2",
"fluent/logger": "^1.0"
"psr/log": "~1.0.2"
},

"require-dev": {
Expand All @@ -47,7 +46,8 @@
},

"suggest": {
"packfire/php5.3-compat": "for backward compatibility with PHP 5.3"
"packfire/php5.3-compat": "for backward compatibility with PHP 5.3",
"fluent/logger": "Needed to use the 'fluent' handler for fluentd support"
},

"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions tests/FluentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ class FluentTest extends BaseRollbarTest

public function testFluent()
{
if (!class_exists('Fluent\Logger\FluentLogger')) {
$this->markTestSkipped(
'Suggested package fluent/logger not installed, skip FluentTest'
);
}

$socket = socket_create_listen(null);
socket_getsockname($socket, $address, $port);

Expand Down