芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/.trash/libraries.7/vendor/maximebf/debugbar/src/DebugBar/Bridge/SlimCollector.php
slim = $slim; if ($log = $slim->getLog()) { $this->originalLogWriter = $log->getWriter(); $log->setWriter($this); $log->setEnabled(true); } } public function write($message, $level) { if ($this->originalLogWriter) { $this->originalLogWriter->write($message, $level); } $this->addMessage($message, $this->getLevelName($level)); } protected function getLevelName($level) { $map = array( Log::EMERGENCY => LogLevel::EMERGENCY, Log::ALERT => LogLevel::ALERT, Log::CRITICAL => LogLevel::CRITICAL, Log::ERROR => LogLevel::ERROR, Log::WARN => LogLevel::WARNING, Log::NOTICE => LogLevel::NOTICE, Log::INFO => LogLevel::INFO, Log::DEBUG => LogLevel::DEBUG ); return $map[$level]; } public function getName() { return 'slim'; } }