Beispiel #1
0
 function logger($name)
 {
     return Logging::getLogger($name);
 }
Beispiel #2
0
function logger($domain = null)
{
    $name = '__LYSINE__';
    if ($domain) {
        $name .= '.' . strtoupper($domain);
    }
    return \Lysine\Utils\Logging::getLogger($name);
}
Beispiel #3
0
 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 %-8s %s', $record['time'], $record['pid'], $record['level_name'], $line));
     }
 }