mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-08-29 10:38:57 +02:00
Send mail notifications.
This commit is contained in:
+26
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user