public static function __callStatic($priority = 'debug', $params = array()) { $trace = Debugger::trace(array('format' => 'array', 'depth' => 3, 'includeScope' => false)); $trace = $trace[2]; if (empty($trace)) { throw UnexpectedValueException('Could not trace method'); } $trace = array('method' => $trace['functionRef'], 'line' => $trace['line'], 'file' => $trace['file']); $message = "//////////// {$trace['file']}:{$trace['line']} -> {$trace['method']} ////////////\n"; foreach ($params as $param) { $dump = Debugger::export($param); $message = "{$message}{$dump}\n"; } return parent::write($priority, $message); }