Please Disable Your Browser Adblock Extension for our site and Refresh This Page!

our ads are user friendly, we do not serve popup ads. We serve responsible ads!

Refresh Page
Skip to main content
On . By CodimTh
Category:

Examples of how to log in Drupal 8

 

//System is unusable
    \Drupal::logger('codimth_controller')->emergency($message);
//Action must be taken immediately
    \Drupal::logger('codimth_controller')->alert($message);
//Critical conditions
    \Drupal::logger('codimth_controller')->critical($message);
//Tipical errors, as when the page doesn't load
    \Drupal::logger('codimth_controller')->error($message);
//warning conditions
    \Drupal::logger('codimth_controller')->warning($message);
// Normal information
    \Drupal::logger('codimth_controller')->notice($message);
// Interesting events
    \Drupal::logger('codimth_controller')->info($message);
// debug information
    \Drupal::logger('codimth_controller')->debug($message);

 

To see recent log messages in your website go to /admin/reports/dblog and you'll show page like this.

log messages

 

Riadh Rahmi

Senior Web Developer (Drupal & Laravel)

I am a senior web developer, I have experience in planning and developing large scale dynamic web applications especially in Drupal, Laravel.

Web Posts

Search

Page Facebook