示例#1
0
 /**
  * Create a new FileLogger object
  *
  * @param null $filename optional filename (path + filename)
  *
  * @throws \Synergy\Exception\InvalidArgumentException
  */
 public function __construct($filename = null)
 {
     parent::__construct();
     if (!is_null($filename)) {
         $this->setFilename($filename);
     }
 }
示例#2
0
 /**
  * Create a new FileLogger object
  *
  * @throws \Synergy\Exception\InvalidArgumentException
  */
 public function __construct()
 {
     parent::__construct();
     if (PHP_SAPI == 'cli') {
         $arg = ArgumentParser::parseArguments();
         if ($arg->hasSwitch('v')) {
             $this->_verbosity = 1;
         } else {
             if ($arg->hasSwitch('vv')) {
                 $this->_verbosity = 2;
             }
         }
     }
 }