This PR allows to set Logdna tags on the monolog handler like this
$handler = new LogdnaHandler($key, $host);
$handler->setTags($tags);
The way the query params are generated is also slightly improved from sprintf to http_build_query+array_filter, since the tags can be anything it should be at least urlencode()'d which is handled by http_build_query. The array_filter could potentialy remove "0"'s but i don't think that was ever a valid input for the other params so it should not break anything, but ultimately it may not be necesary, but sending empty params isnt necesary either, so i included it for now, but i can remove it if you want.
This PR allows to set Logdna tags on the monolog handler like this
The way the query params are generated is also slightly improved from
sprintf
tohttp_build_query+array_filter
, since the tags can be anything it should be at leasturlencode()
'd which is handled byhttp_build_query
. Thearray_filter
could potentialy remove "0"'s but i don't think that was ever a valid input for the other params so it should not break anything, but ultimately it may not be necesary, but sending empty params isnt necesary either, so i included it for now, but i can remove it if you want.