You are here

public function WatchdogAggregatorSensorPlugin::verboseResultHistory in Monitoring 8

Adds history verbose output to the render array $output.

Parameters

array &$output: Render array where the result will be added.

Overrides DatabaseAggregatorSensorPlugin::verboseResultHistory

File

src/Plugin/monitoring/SensorPlugin/WatchdogAggregatorSensorPlugin.php, line 61
Contains \Drupal\monitoring\Plugin\monitoring\SensorPlugin\WatchdogAggregatorSensorPlugin.

Class

WatchdogAggregatorSensorPlugin
Watchdog aggregator which handles replacement of variables in the message.

Namespace

Drupal\monitoring\Plugin\monitoring\SensorPlugin

Code

public function verboseResultHistory(array &$output) {
  parent::verboseResultHistory($output);

  // Add cutoff info message.
  if (isset($output['verbose_sensor_history']['#description'])) {
    $output['verbose_sensor_history']['#description'] = t('Records in dblog limited to :limit records. :parent_info', [
      ':limit' => \Drupal::configFactory()
        ->get('dblog.settings')
        ->get('row_limit'),
      ':parent_info' => $output['verbose_sensor_history']['#description'],
    ]);
  }
}