DrupalWeb Development

Great reasons for using Drupal - Part1: Logging

After diving into Drupal more and more I thought I need to point out some great reasons that convinced me with Drupal over other content management systems (CMS) and blogging-like tools like Wordpress …

Today:

System Logging Framework in drupal

every bigger application has all sorts of conditions to signal all the time… tired webmasters and system admins know that…

  • Type 1 F(atal): System errors: Mysql error logfile, Webserver-logfile for hard errors, domain related logfile and these sorts are the errors you find on every unix box
  • Type 2 E(rror): Application errors: then we have a couple of errors that your application can raise – like a false customer data record, a timeout while fetching an RSS feed and all that other crap… usually (web-)applications log this to one special log table
  • Type 3 W(arning): messages that your application (if it's designed well) sends well BEFORE an errors could happen… this stuff is usually mailed around the world to sysadmins, webmasters, etc…
  • Type 4 I(informational) – or debug messages: all the stuff a webmaster or deveoper needs to cope with all his functionality… to understand what happens… to watch his users at work and make sure everythings fine… just infos… another type of data being written or mailed somewhere…

Well – in Drupal installation you have change to find all these, including PHP and MYSQL errors from your plugins in one place – the watchdog…

Drupal has extensive logging capabilities built in.

A framework for plugins to log to same location (a database table) for all sorts of message – may they be of a fatal type like php errors or just informational purpose…

The user can view them all at once, of filter with different filters…

Thereby – the stress webmaster and drupal admin just needs to look in one place to find a (potential) problem with his site…

You say – what the heck – I don't need this…

here's a sample….

How Drupal's logging helps to secure your site

just today I looked at the watchdog of freshly migrated Marketingfan site and found 404 erors…

boring? yes – I'd never had looked at this in my apache logfiles…

but guess what?

The files

</p>

	<p>/community/xmlrpc.php	</p>

	<p>/blogs/xmlrpc.php</p>

	<p>/drupal/xmlrpc.php</p>

	<p>/xmlrpc/xmlrpc.php</p>

	<p>/xmlsrv/xmlrpc.php</p>

	<p>adxmlrpc.php	</p>

	<p>/adserver/adxmlrpc.php	</p>

	<p>/phpAdsNew/adxmlrpc.php </p>

	<p>/phpadsnew/adxmlrpc.php </p>

	<p>/phpads/adxmlrpc.php</p>

	<p>/Ads/adxmlrpc.php	</p>

	<p>/ads/adxmlrpc.php	</p>

	<p>

requested by the 216.10.12.18 were not found…

Interesting… this is just an attack to find a vulnerable DruPal or PHPads installation (older version were vulnerable there)

Well – pretty simple task to block this guy from future attacks to the server.

Also pretty simple task to contact the complaint department of it's hoster.

and this is just ONE case were I loved the logging feature…

I already implemented my own application specific logging feature to find some additional site-message in that logfile? believe me – it is SO easy once you understood the frameworks architecture!

My wishlist for the Drupal watchdog:

  1. a message target configuration – to specify which message to mail (because they are URGENT)
  2. a highwater level threshold – to make sure your "404 notfound message" doesn't fill up the database – a possible DDOS threat
  3. making the filtering even better … maybe a two-level filter, a summary view, not sure … just even more gui features… :-)

I might come back here an update my wishlist :-)

Average rating
(0 votes)

Similar entries

  • Over the last 2 weeks I’ve had problems on three sites with the exact same problem.

    The watchdog table grew FASTER than the cron job (which should delete old log entries older than e.g. 3 days) would have deleted it.

    This again ended in a “device full” last night when one watchdog table became 5 gigs.

    (and I had a “table full” problem on another site last week – tough 64bit MYSQL should be able to do 4TB spaces, that one was 4GB only)

    Now, it’s obvious that disk full problems shouldn’t be a problem for a content management system like Drupal to take care about,

  • You guys might wonder why I brag about all the cool features of Drupal and found so many great reasons and fancy features for using Drupal but still run movable type in a stone-age version here

    well Marketingfan was already migrated to Drupal 2 months ago and I found one simple thing missing…

    Comment follow-up notification mails for anonymous AND registered users with EASY unsubscribe option as we know it!

  • Post about the advantage of Drupal for multi-site setups, hosting many different web sites from one codebase.

  • So DRUPAL6 was released last week finally – this is the GO for all module developers (like us) and heavy drupal users (like us)

    to set aside their “normal” business (which is NOT drupal maintenance, consulting or else) and plan for DOZENs of hours and days

    to upgrade all their sites…

    Frankly,

    we are running DRUPAL 4.x sites

    we are running DRUPAL 5.x sites

    and we will be running the new company site for cemper.com on Drupal 6 soon (postponed launch for DP6)

    BUT, I will not and cannot commit to an upgrade mania solely to generate work and say we’re running recent versions

  • Post about the advantages and possibilities of flexible data modelling with CCK, Contemplate and Drupal – my Part 2 in great reasons for Drupal