232,905 Installs and Counting! Get Sparks Now!
Hey! Keep up to date with the project through its beta and public launch by following @getsparks.
Tweet
A Quick Looks At Sparks (EllisLab Official Post)
March 11, 2012
from: codeigniter.com
The Top Sparks of 2011
December 31, 2011
from: codefury.net
CodeIgniter Starter Project − A Starting Point for Any CI Dev
December 12, 2011
from: github.com
NetTuts+ Tutorial for GetSparks
November 24, 2011
from: net.tutsplus.com
Send e-mail summaries of the logs
| Contributor | : splitfeed |
| : Log in to view | |
| Author Website | : http://www.splitfeed.net |
| Spark Website | : https://github.com/splitfeed/codeigniter-error-notifier |
| Repository Type | : git |
| Number of Installs | : 1,000 |
php tools/spark install -v0.0.4 error_notifier
Or download this version manually:
Get error_notifier-0.0.4.zip
The error notifier is (for now) a single method for generating and mailing the latest logs to a specified e-mail account. Each time it runs it compiles the logs since the last run and composes an email of it. Any repeated lines will be concatenated and marked as "[Repeated x times]" to increase readability.
The config/error_notifier.php contains settings for the e-mail being sent and must be configured before use.
Sets sender and recipient of the log emails
Determines if empty mails should be sent or not. Sending of empty mails are useful to see that monitoring is still functioning, but that no log entries have appeared since last time.
The equivalent of the common CI configuration entry, but here it specifies a filter to apply on the log before mailing.
The error notifier keeps a state file with a timestamp in it to keep track of when the logs last were mailed. This file is by default saved in the logfolder and is named ".notifier_state".
Makes the warning level colored and the "Repeated x times" a lighter gray for readability. Any suggestions here are welcome, readability is one of the most important aspects of these mails!
Trim the base path of CI from all paths for shorter messages. The full paths are always available in the real log file.
Set up a controller something like this:
class Cronjob extends CI_Controller {
public function send_logs() {
$this->load->spark('error_notifier/0.0.4');
$this->error_notifier->send();
}
}
Then visit it with a browser to make sure it works, then setup a cron job on your server to run it continuously.
php tools/spark install -v0.0.3 error_notifier
Or download this version manually:
Get error_notifier-0.0.3.zip
php tools/spark install -v0.0.2 error_notifier
Or download this version manually:
Get error_notifier-0.0.2.zip
php tools/spark install -v0.0.1 error_notifier
Or download this version manually:
Get error_notifier-0.0.1.zip