23     protected static $levels = array(
 
   32     protected $level = self::ERROR;
 
   35     protected $display = 
false;
 
   52         $this->hooks = $hooks;
 
   63         if (is_string($level)) {
 
   64             $levelStringsToInts = array_flip(self::$levels);
 
   65             $level = $levelStringsToInts[$level];
 
   67         $this->level = $level;
 
   90         $this->display = $display;
 
  101         if ($this->level == self::OFF || $level < $this->level) {
 
  105         if (!array_key_exists($level, self::$levels)) {
 
  109         $levelString = self::$levels[$level];
 
  112         $display = $this->display && $level > self::NOTICE;
 
  114         $this->process(
"$levelString: $message", $display, $level);
 
  126         return $this->log(
$message, self::ERROR);
 
  136         return $this->log(
$message, self::WARNING);
 
  146         return $this->log(
$message, self::NOTICE);
 
  156         return $this->log(
$message, self::INFO);
 
  167         $this->process(
$data, $display, self::ERROR);
 
  185             'display' => $display,
 
  186             'to_screen' => $display,
 
  189         if (!$this->hooks->trigger(
'debug', 
'log', 
$params, 
true)) {
 
  196         if (!isset($this->CONFIG->pagesetupdone)) {
 
  207         if (preg_match(
'~^(cache|action)/~', 
$path)) {
 
  211         if ($display == 
true) {
 
  212             echo 
'<pre class="elgg-logger-data">';
 
  213             echo htmlspecialchars(print_r(
$data, 
true), ENT_QUOTES, 
'UTF-8');
 
  216             error_log(print_r(
$data, 
true));
 
__construct(\Elgg\PluginHooksService $hooks)
Constructor.
 
error($message)
Log message at the ERROR level.
 
dump($data, $display=true)
Dump data to log or screen.
 
warn($message)
Log message at the WARNING level.
 
notice($message)
Log message at the NOTICE level.
 
process($data, $display, $level)
Process logging data.
 
log($message, $level=self::NOTICE)
Add a message to the log.
 
getLevel()
Get the current logging level.
 
setLevel($level)
Set the logging level.
 
info($message)
Log message at the INFO level.
 
setDisplay($display)
Set whether the logging should be displayed to the user.
 
elgg_get_site_url($site_guid=0)
Get the URL for the current (or specified) site.
 
elgg_in_context($context)
Check if this context exists anywhere in the stack.