SysLogTest.php
Same filename in this branch
Same filename in other branches
- 9 core/modules/syslog/tests/src/Kernel/SyslogTest.php
- 9 core/modules/syslog/tests/src/Functional/SyslogTest.php
- 9 core/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogTest.php
- 8.9.x core/modules/syslog/tests/src/Kernel/SyslogTest.php
- 8.9.x core/modules/syslog/tests/src/Functional/SyslogTest.php
- 8.9.x core/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogTest.php
- 11.x core/modules/syslog/tests/src/Kernel/SyslogTest.php
- 11.x core/modules/syslog/tests/src/Functional/SyslogTest.php
- 11.x core/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogTest.php
Namespace
Drupal\syslog_test\LoggerFile
-
core/
modules/ syslog/ tests/ modules/ syslog_test/ src/ Logger/ SysLogTest.php
View source
<?php
namespace Drupal\syslog_test\Logger;
use Drupal\syslog\Logger\SysLog;
use Psr\Log\LoggerInterface;
/**
* Redirects logging messages to error_log.
*/
class SysLogTest extends SysLog implements LoggerInterface {
/**
* {@inheritdoc}
*/
protected function syslogWrapper($level, $entry) {
$log_path = \Drupal::service('file_system')->realpath('public://syslog.log');
error_log($entry . PHP_EOL, 3, $log_path);
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
SysLogTest | Redirects logging messages to error_log. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.