/**
  * Initialize the object.
  *
  * @param      AgaviContext An AgaviContext instance.
  * @param      array        An associative array of initialization parameters.
  *
  * @author     Bob Zoller <*****@*****.**>
  * @since      0.10.0
  */
 public function initialize(AgaviContext $context, array $parameters = array())
 {
     $parameters['destination'] = 'php://stdout';
     // 'a' doesn't work on Linux
     // http://bugs.php.net/bug.php?id=45303
     $parameters['mode'] = 'w';
     parent::initialize($context, $parameters);
 }
 /**
  * Retrieve the file handle for this FileAppender.
  *
  * @throws     <b>AgaviLoggingException</b> if file cannot be opened for
  *                                          appending.
  *
  * @return     resource The open file handle.
  *
  * @author     Bob Zoller <*****@*****.**>
  * @since      0.10.0
  */
 protected function getHandle()
 {
     $destination = $this->getParameter('destination');
     if (is_null($this->handle) && (!is_writable(dirname($destination)) || file_exists($destination) && !is_writable($destination))) {
         throw new AgaviLoggingException('Cannot open file "' . $destination . '", please check permissions on file or directory.');
     }
     return parent::getHandle();
 }