'php://stderr', 'types' => null, 'scopes' => array(), 'outputAs' => $outputAs, ), $this->_config); $config = $this->config($config); if ($config['stream'] instanceof ConsoleOutput) { $this->_output = $config['stream']; } elseif (is_string($config['stream'])) { $this->_output = new ConsoleOutput($config['stream']); } else { throw new CakeLogException('`stream` not a ConsoleOutput nor string'); } $this->_output->outputAs($config['outputAs']); } /** * Implements writing to console. * * @param string $type The type of log you are making. * @param string $message The message you want to log. * @return bool success of write. */ public function write($type, $message) { $output = date('Y-m-d H:i:s') . ' ' . ucfirst($type) . ': ' . $message . "\n"; return $this->_output->write(sprintf('<%s>%s', $type, $output, $type), false); } }