Monday, 3 June 2013

Drupal 7 - Installing and configure Drupal syslog module, disable dblog module

General analytics shows that the largest system drag is INSERTING into the `watchdog` table on every request. The Drupal Syslog module will utilize the "rsyslogd" or "syslogd" daemon process to log "watchdog" events instead of writing to the database, which I expect to improve performance. In addition to configuring the Syslog module, the "(r)syslog" process must be configured properly to accept the log statements, and "logrotate" must be configured to archive these log files correctly (see the config for other logs). Finally, once these configurations have been updated, both the "(r)syslog" and "logrotate" services must be restarted, e.g. "sudo service rsyslog restart".

     a) Drupal Syslog Module:
     b) Ubuntu "rsyslog.conf" man page:

1. Goto Admin -> Modules [admin/modules]
2. Enable the "Syslog" Core module
3. Goto Configuration -> Development -> Logging and errors[admin/config/development/logging
4. select "LOG_LOCAL0" from "Syslog facility" dropdown and click on save configuration
5. Goto terminal and Edit the file "/etc/rsyslog.conf"  file, add this line: local0.* /var/log/drupal.log
6. Type the command "service rsyslog restart"
7. Type the command "tail /var/log/drupal.log" to verify that drupal.log contains the log messages
8. Goto Modules and Disable "Database logging" core module.
7. Clear cache

No comments:

Post a Comment

Thank you so much for providing your valuable feedback. I will will look into them and update my skills & technologies accordingly.