You are here

public function JsonLog::__construct in JSONlog 8.2

Same name and namespace in other branches
  1. 8 src/Logger/JsonLog.php \Drupal\jsonlog\Logger\JsonLog::__construct()
  2. 3.x src/Logger/JsonLog.php \Drupal\jsonlog\Logger\JsonLog::__construct()

JsonLog constructor.

Parameters

ConfigFactoryInterface $config_factory:

LogMessageParserInterface $parser:

ModuleHandlerInterface $moduleHandler:

RequestStack $requestStack:

File

src/Logger/JsonLog.php, line 105

Class

JsonLog
Redirects logging messages to jsonlog.

Namespace

Drupal\jsonlog\Logger

Code

public function __construct(ConfigFactoryInterface $config_factory, LogMessageParserInterface $parser, ModuleHandlerInterface $moduleHandler, RequestStack $requestStack) {
  $this->config = $config_factory
    ->get('jsonlog.settings');
  $this->parser = $parser;
  $this->moduleHandler = $moduleHandler;
  $this->requestStack = $requestStack;
  $this
    ->loadDefaultSettings();
}