Log::Dispatch::Twilio - Log output via Twilio SMS Message
use Log::Dispatch; my $logger = Log::Dispatch->new( outputs => [ [ 'Twilio, min_level => 'emergency', account_sid => '<your-twilio-account-sid>', auth_token => '<your-twilio-auth-token>', from => '<number-to-send-msg-from>', to => '<number-to-send-msg-to>', ], ], );
This module provides a Log::Dispatch output that sends log messages via Twilio.
Log::Dispatch
While you probably don't want every logged message from your application to go out via Twilio, I find it particularly useful to set it up as part of my Log::Dispatch configuration for critical/emergency errors. In the event that something dire happens, I'll receive an SMS message through Twilio right away.
When adding Twilio output to your Log::Dispatch configuration, the following options are required:
Your Twilio "Account Sid".
Your Twilio "Auth Token".
The telephone number from which the SMS messages will appear to be sent from.
This number must be a number attached to your Twilio account.
The telephone number to which the SMS messages will be sent to.
Maximum number of SMS messages that can be generated from a single logged item. Defaults to 1.
Constructor.
Implemented as per the Log::Dispatch::Output interface.
Logs message, by sending it as an SMS message to the configured number via the Twilio API.
Graham TerMarsch (cpan@howlingfrog.com)
Copyright (C) 2012, Graham TerMarsch. All Rights Reserved.
This is free software, you can redistribute it and/or modify it under the Artistic-2.0 license.
Log::Dispatch, http://www.twilio.com/.
To install Log::Dispatch::Twilio, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Dispatch::Twilio
CPAN shell
perl -MCPAN -e shell install Log::Dispatch::Twilio
For more information on module installation, please visit the detailed CPAN module installation guide.