Add a message to Drupal 8 Log system | Drupal 8

Add a message to Drupal 8 Log system

Submitted by editor on Fri, 12/04/2015 - 12:11
Question

How to add a message to Drupal 8 Log system ?
On /admin/reports/dblog, Recent log messages

Examples:

        \Drupal::logger("mymodule")->alert("Message");
        \Drupal::logger("mymodule")->critical("Message");
        \Drupal::logger("mymodule")->debug("Message");
        \Drupal::logger("mymodule")->emergency("Message");
        \Drupal::logger("mymodule")->error("Message");
        \Drupal::logger("mymodule")->info("Message");
        \Drupal::logger("mymodule")->notice("Message");
        \Drupal::logger("mymodule")->warning("Message");

Tags

Comments

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.