private function XmlSitemapTestBase::formatWatchdogMessage in XML sitemap 8
Same name and namespace in other branches
- 2.x tests/src/Functional/XmlSitemapTestBase.php \Drupal\Tests\xmlsitemap\Functional\XmlSitemapTestBase::formatWatchdogMessage()
Format a watchdog message in a one-line summary.
Parameters
string $message: A watchdog message object.
Return value
string A string containing the watchdog message's timestamp, severity, type, and actual message.
1 call to XmlSitemapTestBase::formatWatchdogMessage()
- XmlSitemapTestBase::assertNoWatchdogErrors in tests/
src/ Functional/ XmlSitemapTestBase.php - Check that there were no watchdog errors or worse.
File
- tests/
src/ Functional/ XmlSitemapTestBase.php, line 480
Class
- XmlSitemapTestBase
- Helper test class with some added functions for testing.
Namespace
Drupal\Tests\xmlsitemap\FunctionalCode
private function formatWatchdogMessage($message) {
static $levels;
if (!isset($levels)) {
module_load_include('admin.inc', 'dblog');
$levels = RfcLogLevel::getLevels();
}
return t('@timestamp - @severity - @type - @message', [
'@timestamp' => $message->timestamp,
'@severity' => $levels[$message->severity],
'@type' => $message->type,
]);
}