Explorar el Código

Add IFTTTHandler to docs

Jordi Boggiano hace 10 años
padre
commit
57dc037895

+ 1 - 0
doc/02-handlers-formatters-processors.md

@@ -35,6 +35,7 @@
 - _SlackHandler_: Logs records to a [Slack](https://www.slack.com/) account.
 - _MandrillHandler_: Sends emails via the Mandrill API using a [`Swift_Message`](http://swiftmailer.org/) instance.
 - _FleepHookHandler_: Logs records to a [Fleep](https://fleep.io/) conversation using Webhooks.
+- _IFTTTHandler_: Notifies an [IFTTT](https://ifttt.com/maker) trigger with the log channel, level name and message.
 
 ### Log specific servers and networked logging
 

+ 6 - 0
src/Monolog/Handler/IFTTTHandler.php

@@ -16,6 +16,12 @@ use Monolog\Logger;
 /**
  * IFTTTHandler uses cURL to trigger IFTTT Maker actions
  *
+ * Register a secret key and trigger/event name at https://ifttt.com/maker
+ *
+ * value1 will be the channel from monolog's Logger constructor,
+ * value2 will be the level name (ERROR, WARNING, ..)
+ * value3 will be the log record's message
+ *
  * @author Nehal Patel <nehal@nehalpatel.me>
  */
 class IFTTTHandler extends AbstractProcessingHandler