SysLogTest.php in Drupal 9
Same filename in this branch
Same filename and directory in other branches
Namespace
Drupal\syslog_test\LoggerFile
core/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogTest.phpView 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
Name | Description |
---|---|
SysLogTest | Redirects logging messages to error_log. |