Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  *
  * @since 2.0.1 removed level param
  */
 public function __construct(FormatterInterface $formatter = null, $stopPropagation = false)
 {
     // non CLI mode only
     if (!$this->isCliMode()) {
         // register flush method
         register_shutdown_function([__CLASS__, 'flush']);
         // call parent constructor
         parent::__construct($formatter, $stopPropagation);
     }
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  *
  * @param  string|resource $stream the stream
  * @param  FormatterInterface $formatter
  * @param  bool $stopPropagation
  * @access public
  * @since  2.0.1 removed level param
  */
 public function __construct($stream, FormatterInterface $formatter = null, $stopPropagation = false)
 {
     // open stream
     $strm = $this->openStream($stream);
     if (!is_resource($strm)) {
         throw new LogicException(Message::get(Message::LOG_STREAM_FAIL, $stream), Message::LOG_STREAM_FAIL);
     }
     $this->stream = $strm;
     parent::__construct($formatter, $stopPropagation);
 }
Ejemplo n.º 3
0
 /**
  * @param  int $facility
  * @param  int $logOpts
  * @param  FormatterInterface $formatter
  * @param  bool $stopPropagation
  * @access public
  * @since  2.0.1 removed level param
  */
 public function __construct($facility = LOG_USER, $logOpts = LOG_PID, FormatterInterface $formatter = null, $stopPropagation = false)
 {
     $this->facility = $facility;
     $this->logopts = $logOpts;
     parent::__construct($formatter, $stopPropagation);
 }