CakePHP Email Logger
Email engine for CakeLog, CakePHP 2.x Sends out emails for log entries.
Optional configuration for log levels to send emails, by default to all core log levels.
This plugin was developed when playing with a shared @phpfog CakePHP installation.
No shell and/or file access there. This plugin is just a quick and dirty way check
your app without turning debug on, or check errors that only occur with debug off.
- PHP 5.3
- CakePHP 2.x
- Download this: http://github.com/ceeram/EmailLogger/zipball/master
- Unzip that download.
- Copy the resulting folder to app/Plugin
- Rename the folder you just copied to EmailLogger
In your app directory type:
git submodule add git://github.com/ceeram/EmailLogger.git Plugin/EmailLogger git submodule init git submodule update
In your plugin directory type
git clone git://github.com/ceeram/EmailLogger.git EmailLogger
In app/Config/bootstrap.php add: CakePlugin::load(‘EmailLogger’, array(‘bootstrap’ => true));
Add $email_logger configuration in app/Config/email.php or create EmailLogger/Config/config.php
Define which levels and email configuration to use for EmailLogger.
Set ‘duplicates’ to false/true to avoid receiving duplicate emails. (defaults to true)
Without this file, EmailLogger will send out emails for all log entries and all core log levels.
Note: Don’t setup your email configuration for EmailLogger with ‘log’ => true
or any log level which will be handled by EmailLogger
It’s not recommended to use this in production.
Set ‘levels’ => array(‘logger’) and it wont ever send out emails for core errors,
and add CakeLog::write(‘logger’, ‘Log this’); or $this→log(‘Log this’, ‘logger’);
to the code you want to debug.
Copyright © 2012 Ceeram
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN