protected function SysLogTest::syslogWrapper in Drupal 9
Same name and namespace in other branches
- 8 core/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogTest.php \Drupal\syslog_test\Logger\SysLogTest::syslogWrapper()
- 10 core/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogTest.php \Drupal\syslog_test\Logger\SysLogTest::syslogWrapper()
A syslog wrapper to make syslog functionality testable.
Parameters
int $level: The syslog priority.
string $entry: The message to send to syslog function.
Overrides SysLog::syslogWrapper
File
- core/
modules/ syslog/ tests/ modules/ syslog_test/ src/ Logger/ SysLogTest.php, line 16
Class
- SysLogTest
- Redirects logging messages to error_log.
Namespace
Drupal\syslog_test\LoggerCode
protected function syslogWrapper($level, $entry) {
$log_path = \Drupal::service('file_system')
->realpath('public://syslog.log');
error_log($entry . PHP_EOL, 3, $log_path);
}