1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-09 06:36:46 +02:00

Add method for adding additional tags to Loggly handler

This commit is contained in:
Arnas L
2014-06-26 10:04:38 +03:00
parent 0951050a1e
commit 12987cfa51

View File

@@ -46,6 +46,13 @@ class LogglyHandler extends AbstractProcessingHandler
$this->tag = $tag;
}
public function addTag($tag)
{
$tags = (strlen($this->tag) > 0) ? explode(',', $this->tag) : array();
$tags[] = $tag;
$this->tag = implode(',', $tags);
}
protected function write(array $record)
{
$this->send($record["formatted"], self::ENDPOINT_SINGLE);