diff --git a/source/Ice/Core/Action/Worker.php b/source/Ice/Core/Action/Worker.php index 8cb84323..c500af52 100644 --- a/source/Ice/Core/Action/Worker.php +++ b/source/Ice/Core/Action/Worker.php @@ -190,7 +190,7 @@ private function dispatch(array $dispatchWorker, array $params) $taskLog = Type_String::printR($task, false); - Logger::log(get_class($this) . ' (' . $i . '/' . $dispatchWorker['tasks'] . ') #' . $hash . ' ' . $taskLog . ' left: ' . $leftTime, 'job'); + Logger::log('[ '. $i . '/' . $dispatchWorker['tasks'] .' : ' . ($dispatchWorker['tasks'] - $i) . ' ] #' . $hash .' ' . $taskLog . ' [left: ' . $leftTime . ']', get_class($this)); $class::call(['workerKey' => $workerKey, 'hash' => $hash, 'task' => $taskLog], 0, $bg); } catch (\Exception $e) { $this->getLogger()->error(['Worker {$0}: Task #{$1} failed - {$2}', [get_class($this), $hash, Type_String::printR($task)]], __FILE__, __LINE__, $e); diff --git a/source/Ice/Core/Logger.php b/source/Ice/Core/Logger.php index 0d01f51b..c4cbb307 100644 --- a/source/Ice/Core/Logger.php +++ b/source/Ice/Core/Logger.php @@ -156,7 +156,7 @@ private function __construct($class) */ public static function init() { - self::$reserveMemory = str_repeat('#', pow(2, 20)); + self::$reserveMemory = str_repeat('#', pow(2, 25)); if (Environment::getInstance()->isProduction()) { error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE & ~E_USER_NOTICE & ~E_DEPRECATED & ~E_USER_DEPRECATED); @@ -167,6 +167,7 @@ public static function init() error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED); // Оставить только E_ALL ini_set('display_errors', 1); + ini_set('display_startup_errors', 1); ini_set('xdebug.var_display_max_depth', -1); ini_set('xdebug.profiler_enable', 1); @@ -185,6 +186,7 @@ public static function init() public static function shutdownHandler() { self::$reserveMemory = null; +// gc_collect_cycles(); //todo: Response output mast by here if ($error = error_get_last()) {