class VarDumperWatchdog in VarDumper 8
Same name and namespace in other branches
- 7 modules/vardumper_watchdog/src/VarDumper/VarDumperWatchdog.php \Drupal\vardumper_watchdog\VarDumper\VarDumperWatchdog
The VarDumperWatchdog class.
Hierarchy
- class \Drupal\vardumper\VarDumper\VarDumperDebug
- class \Drupal\vardumper_watchdog\VarDumper\VarDumperWatchdog
Expanded class hierarchy of VarDumperWatchdog
1 string reference to 'VarDumperWatchdog'
- vardumper_watchdog.services.yml in modules/
vardumper_watchdog/ vardumper_watchdog.services.yml - modules/vardumper_watchdog/vardumper_watchdog.services.yml
1 service uses VarDumperWatchdog
- vardumper_watchdog in modules/
vardumper_watchdog/ vardumper_watchdog.services.yml - \Drupal\vardumper_watchdog\VarDumper\VarDumperWatchdog
File
- modules/
vardumper_watchdog/ src/ VarDumper/ VarDumperWatchdog.php, line 10
Namespace
Drupal\vardumper_watchdog\VarDumperView source
class VarDumperWatchdog extends VarDumperDebug {
/**
* {@inheritdoc}
*/
public function dump($var, $name = '') {
// Permission are not checked in this submodule, see 'View site reports' permission.
$html = $this
->getHeaders($name, $this
->getDebugInformation()) . $this
->getDebug($var);
// Locale issue https://www.drupal.org/project/drupal/issues/1885192:
// field locales_source.source is not suitable for long texts and huge config objects.
if (\Drupal::moduleHandler()
->moduleExists('locale') && ($length = mb_strlen($html) >= 64000)) {
\Drupal::logger('vardumper_watchdog')
->debug('Cannot log objects longer than 64Kb if Locale module is enabled. Currents size is @size. See <a href=https://www.drupal.org/project/drup al/issues/1885192>https://www.drupal.org/project/drupal/issues/1885192</a>. @excerpt...', [
'@size' => $length,
'@excerpt' => mb_substr(strip_tags($html), 0, 256),
]);
}
else {
\Drupal::logger('vardumper_watchdog')
->debug($html);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
VarDumperDebug:: |
protected | property | ||
VarDumperDebug:: |
protected | property | ||
VarDumperDebug:: |
public | function | ||
VarDumperDebug:: |
public | function | ||
VarDumperDebug:: |
public | function | ||
VarDumperDebug:: |
public | function | ||
VarDumperWatchdog:: |
public | function |