/** * Get translated level name. * * @return string */ public function name() { return log_levels()->get($this->level); }
/** * Get the log entries navigation tree. * * @param bool|false $trans * * @return array */ public function tree($trans = false) { $tree = $this->stats(); array_walk($tree, function (&$count, $level) use($trans) { $count = ['name' => $trans ? log_levels()->get($level) : $level, 'count' => $count]; }); return $tree; }