class SysLogTest in Drupal 8
Same name in this branch
- 8 core/modules/syslog/tests/src/Functional/SyslogTest.php \Drupal\Tests\syslog\Functional\SyslogTest
- 8 core/modules/syslog/tests/src/Kernel/SyslogTest.php \Drupal\Tests\syslog\Kernel\SyslogTest
- 8 core/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogTest.php \Drupal\syslog_test\Logger\SysLogTest
Same name and namespace in other branches
- 9 core/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogTest.php \Drupal\syslog_test\Logger\SysLogTest
- 10 core/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogTest.php \Drupal\syslog_test\Logger\SysLogTest
Redirects logging messages to error_log.
Hierarchy
- class \Drupal\syslog\Logger\SysLog implements \Psr\Log\LoggerInterface uses RfcLoggerTrait
- class \Drupal\syslog_test\Logger\SysLogTest implements \Psr\Log\LoggerInterface
Expanded class hierarchy of SysLogTest
1 string reference to 'SysLogTest'
- syslog_test.services.yml in core/
modules/ syslog/ tests/ modules/ syslog_test/ syslog_test.services.yml - core/modules/syslog/tests/modules/syslog_test/syslog_test.services.yml
1 service uses SysLogTest
- logger.syslog_test in core/
modules/ syslog/ tests/ modules/ syslog_test/ syslog_test.services.yml - Drupal\syslog_test\Logger\SysLogTest
File
- core/
modules/ syslog/ tests/ modules/ syslog_test/ src/ Logger/ SysLogTest.php, line 11
Namespace
Drupal\syslog_test\LoggerView source
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);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RfcLoggerTrait:: |
public | function | ||
RfcLoggerTrait:: |
public | function | ||
RfcLoggerTrait:: |
public | function | ||
RfcLoggerTrait:: |
public | function | ||
RfcLoggerTrait:: |
public | function | ||
RfcLoggerTrait:: |
public | function | ||
RfcLoggerTrait:: |
public | function | ||
RfcLoggerTrait:: |
public | function | ||
SysLog:: |
protected | property | A configuration object containing syslog settings. | |
SysLog:: |
protected | property | Stores whether there is a system logger connection opened or not. | |
SysLog:: |
protected | property | The message's placeholders parser. | |
SysLog:: |
public | function |
Logs with an arbitrary level. Overrides RfcLoggerTrait:: |
|
SysLog:: |
protected | function | Opens a connection to the system logger. | |
SysLog:: |
public | function | Constructs a SysLog object. | |
SysLogTest:: |
protected | function |
A syslog wrapper to make syslog functionality testable. Overrides SysLog:: |