Send mail notifications.

This commit is contained in:
Andrés Montañez
2013-12-15 23:44:28 -02:00
parent 75a2463240
commit f646647036
3 changed files with 129 additions and 3 deletions
+26 -1
View File
@@ -26,6 +26,12 @@ class Console
*/
private static $log = null;
/**
* The current logfile
* @var string
*/
private static $logFile = null;
/**
* Enables or Disables Logging
* @var boolean
@@ -181,7 +187,8 @@ class Console
{
if (self::$logEnabled) {
if (self::$log == null) {
self::$log = fopen('.mage/logs/log-' . date('Ymd-His') . '.log', 'w');
self::$logFile = realpath('.mage/logs') . '/log-' . date('Ymd-His') . '.log';
self::$log = fopen(self::$logFile, 'w');
}
$message = date('Y-m-d H:i:s -- ') . $message;
@@ -189,6 +196,24 @@ class Console
}
}
/**
* Return the screen buffer
* @return string
*/
public static function getOutput()
{
return self::$screenBuffer;
}
/**
* Returns the Log File
* @return string
*/
public static function getLogFile()
{
return self::$logFile;
}
/**
* Check Logs
* @param \Mage\Config $config