Scalr\LogCollector\AbstractLogger::__construct PHP Méthode

__construct() public méthode

Constructor. Instantiates AbstractLogger, prepares backend
public __construct ( array $config )
$config array Logger configuration
    public function __construct($config)
    {
        $this->enabled = $config["enabled"];
        if ($this->enabled === true) {
            $this->defaultTag = $config["tag"];
            $this->validateConfig($config);
            $this->setWriter($config);
        }
        $this->initializeSubscribers();
    }

Usage Example

Exemple #1
0
 /**
  * Constructor. Instantiates ApiLogger, prepares backend
  *
  * @param ApiLoggerConfiguration $config  Api logger config object
  */
 public function __construct($config)
 {
     parent::__construct(\Scalr::config('scalr.logger.api'));
     $this->ipAddress = $config->ipAddress;
     $this->requestId = $config->requestId;
     $this->requestType = $config->requestType;
 }
All Usage Examples Of Scalr\LogCollector\AbstractLogger::__construct