Skip directly to content

Welcome to my personal website. I am Sivaji a web developer from Chennai with 2+ years experience in Drupal.

How to Prevent PHP notices logging to watchdog

sivaji's picture
on August 14th, 2011 at 12:42:14 PM

dblog is one of the handy features of Drupal. It's a core module that monitors your system, capturing system events to database (or to *nix syslog with syslog module). This is useful for site administrators who want a quick overview of activities on their site. It also records the PHP warnings and notices. Notices are often trivial and they could be ignored from logging, IMO.

While it is essential to keep your Drupal site free from throwing any PHP notices, but in the current trend where most of the Drupal 7 modules are in beta / pre-beta stage it has been hard to ensure.

I figured out that adding the following code to settings.php prevents Drupal from logging PHP notices and gives room for other useful events.

  1. ini_set('error_reporting', E_ALL ^ E_DEPRECATED ^ E_NOTICE);

Comments

Thank you this will prove usefull as I get many php notices and was wondering how I can deal with them. Thank you gain.

The conflicts of Microsoft Office 2010 cluttered computer Office 2010 desktop, task and time Microsoft Office 2007 needs that make Office 2007 you and your staff Download Office 2010 difficult to work Office 2010 Download effectively. When an Microsoft Office 2010 Download productivity has Microsoft Office 2011 been blocked, the Download Office 2007 performance is Microsoft Office 2007 Professional lower. Microsoft Office 2007 Download simplifies the work Buy Windows 7 which provides

Post new comment