You are here

public function NewRelicLogger::__construct in New Relic 8

Same name and namespace in other branches
  1. 2.x src/Logger/NewRelicLogger.php \Drupal\new_relic_rpm\Logger\NewRelicLogger::__construct()
  2. 2.0.x src/Logger/NewRelicLogger.php \Drupal\new_relic_rpm\Logger\NewRelicLogger::__construct()

Constructs a DbLog object.

Parameters

\Drupal\Core\Logger\LogMessageParserInterface $parser: The parser to use when extracting message variables.

\Drupal\new_relic_rpm\ExtensionAdapter\NewRelicAdapterInterface $adapter: The new relic adapter.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory used to read new relic settings.

File

src/Logger/NewRelicLogger.php, line 57

Class

NewRelicLogger
A Logger that allows sending messages to the New Relic API.

Namespace

Drupal\new_relic_rpm\Logger

Code

public function __construct(LogMessageParserInterface $parser, NewRelicAdapterInterface $adapter, ConfigFactoryInterface $config_factory) {
  $this->parser = $parser;
  $this->adapter = $adapter;
  $this->configFactory = $config_factory;
}