/** * Log the message for the level given the data in context * * @param mixed $level * @param string $message * @param array $context * * @return $this * @since 1.0.0 */ public function log($level, $message, array $context = array()) { parent::log($level, $message, $context); echo '<pre>'; var_dump($this->log_entry); echo '</pre>'; return $this; }
/** * Log the message for the level given the data in context * * @param mixed $level * @param string $message * @param array $context * * @return $this * @since 1.0.0 */ public function log($level, $message, array $context = array()) { parent::log($level, $message, $context); if ($this->file_location === null) { $this->file_location = __DIR__ . '/FileLogger.json'; } $json = json_encode($this->log, JSON_BIGINT_AS_STRING | JSON_PRETTY_PRINT); file_put_contents($this->file_location, $json); return $this; }
/** * Log the message for the level given the data in context * * @param mixed $level * @param string $message * @param array $context * * @return $this * @since 1.0.0 * @link http://www.php.net/manual/en/function.error-log.php */ public function log($level, $message, array $context = array()) { parent::log($level, $message, $context); $output = ''; foreach ($this->columns as $column) { $output .= $this->log_entry->{$column} . "\t"; } $output .= PHP_EOL; $output = addslashes($output); if ($this->file_location === null) { error_log((string) $output); } else { error_log((string) $output, 3, $this->file_location); } return $this; }
/** * Log the message for the level given the data in context * * @param mixed $level * @param string $message * @param array $context * * @return $this * @since 1.0.0 */ public function log($level, $message, array $context = array()) { parent::log($level, $message, $context); call_user_func($this->callback, $this->log_entry); return $this; }
/** * Log the message for the level given the data in context * * @param mixed $level * @param string $message * @param array $context * * @return $this * @since 1.0.0 */ public function log($level, $message, array $context = array()) { parent::log($level, $message, $context); return $this; }