function logger($name) { return Logging::getLogger($name); }
public function emit(array $record) { $record['time'] = strftime($this->datefmt, time()); $record['level_name'] = Logging::getLevelName($record['level']); if (is_array($record['message'])) { $message = $record['message']; } else { $message = array($record['message']); } foreach ($message as $line) { $this->storage->write(sprintf('%s %-8s %s', $record['time'], $record['level_name'], $line)); } }
function logger($domain = null) { $name = '__Onion__'; if ($domain) { $name .= '.' . strtoupper($domain); } return \Onion\Utils\Logging::getLogger($name); }