Difference between revisions of "viewing drupal logs from CLI"
From thelinuxwiki
(Created page with "==problem== viewing drupal logs without using the web interface or drush drupal logs are kept in the backend database,so we can pull them from there. ==solution== (optional...") |
Latest revision as of 12:03, 9 April 2019
==problem== viewing drupal logs without using the web interface or drush
drupal logs are kept in the backend database,so we can pull them from there.
solution
(optional) create a database user just for viewing
example from mysql shell
mysql> GRANT SELECT ON 'my_database_name'.* TO 'my_username'@'localhost' IDENTIFIED BY 'mypassword';
view watchlog logs
mysql -h localhost -u my_username my_database_name -e "select hostname from watchdog " --password=my_password