Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions lib/log/TingClientDrupalWatchDogLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,23 @@
* @see http://api.drupal.org/api/function/watchdog/
*/
class TingClientDrupalWatchDogLogger extends TingClientLogger {

/**
* Log a message to the Drupal watchdog.
*
* @param string $message
* Message to log.
* @param string $severity
* Severity to log with.
*/
public function doLog($message, $severity) {
watchdog('ting client', htmlspecialchars($message, ENT_QUOTES, 'UTF-8', FALSE), array(),
constant('WATCHDOG_' . $severity),
'http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
watchdog(
'ting client',
'<pre>@message</pre>',
['@message' => $message],
constant('WATCHDOG_' . $severity),
'http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]
);
}
}

}