You are here

public function DrupalLoggerAppender::append in Facebook Instant Articles 7

Same name and namespace in other branches
  1. 7.2 src/DrupalLoggerAppender.php \Drupal\fb_instant_articles\DrupalLoggerAppender::append()

Additionally sends logging event to Drupal watchdog.

File

src/DrupalLoggerAppender.php, line 25
Contains \Drupal\fb_instant_articles\DrupalLoggerAppender.

Class

DrupalLoggerAppender
Adds Drupal logging functionality to existing SDK logging.

Namespace

Drupal\fb_instant_articles

Code

public function append(\LoggerLoggingEvent $event) {
  watchdog($event
    ->getLoggerName(), $event
    ->getRenderedMessage(), null, $event
    ->getLevel()
    ->getSyslogEquivalent());
}