function SysLogTest::syslogWrapper

Same name in other branches
  1. 8.9.x core/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogTest.php \Drupal\syslog_test\Logger\SysLogTest::syslogWrapper()
  2. 10 core/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogTest.php \Drupal\syslog_test\Logger\SysLogTest::syslogWrapper()
  3. 11.x core/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogTest.php \Drupal\syslog_test\Logger\SysLogTest::syslogWrapper()

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\Logger

Code

protected function syslogWrapper($level, $entry) {
    $log_path = \Drupal::service('file_system')->realpath('public://syslog.log');
    error_log($entry . PHP_EOL, 3, $log_path);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.