Created
August 9, 2017 13:45
-
-
Save ericjgruber/9468391de9ee0bdf66cc06571640ba6e to your computer and use it in GitHub Desktop.
Drupal 8 "watchdog" logging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
// Try something ... | |
} | |
catch (\Exception $e) { | |
// Log the error message | |
\Drupal::logger('ModuleOrWhateverName')->error($e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment