/**
  * Initialize the on-screen logger by passing {@link ENVIRONMENT::is_http_server()} 
  * to {@link set_is_html()}.
  * @param ENVIRONMENT $env
  */
 public function __construct($env)
 {
     parent::__construct();
     $this->set_is_html($env->is_http_server());
 }
 /**
  * Send the error to the logger.
  * @param EXCEPTION_SIGNATURE $sig
  * @param string $msg
  * @access private
  */
 public function dispatch($sig, $msg)
 {
     if ($this->env->is_http_server() && $this->env->buffered() && $this->env->exception_handler_page) {
         $current_url = $this->env->url();
         $handler_url = $this->env->resolve_file($this->env->exception_handler_page);
         if (strpos($current_url, $handler_url) === false) {
             $parameters = $sig->as_query_string();
             $this->env->redirect_root($handler_url . '?' . $parameters);
         } else {
             parent::dispatch($sig, $msg);
         }
     } else {
         parent::dispatch($sig, $msg);
     }
 }