diff --git a/modules/dblog/dblog.admin.inc b/modules/dblog/dblog.admin.inc
old mode 100644
new mode 100755
index ee577a4..2aff61b
--- a/modules/dblog/dblog.admin.inc
+++ b/modules/dblog/dblog.admin.inc
@@ -19,6 +19,13 @@ function dblog_admin_settings() {
     '#options' => drupal_map_assoc(array(100, 1000, 10000, 100000, 1000000)),
     '#description' => t('The maximum number of rows to keep in the database log. Older entries will be automatically discarded. (Requires a correctly configured <a href="@cron">cron maintenance task</a>.)', array('@cron' => url('admin/reports/status')))
   );
+  $form['dblog_levels'] = array(
+    '#type' => 'checkboxes',
+    '#title' => t('Watchdog reporting level'),
+    '#default_value' => variable_get('dblog_levels', dblog_watchdog_severity_levels()),
+    '#options' => dblog_watchdog_severity_levels(),
+    '#description' => t('The amount of information logged by watchdog can be reduced by setting this to <code>Warning</code> or <code>Error</code>. This should be done if reducing the database load is more important than collecting log information.'),
+  );
 
   return system_settings_form($form);
 }
diff --git a/modules/dblog/dblog.module b/modules/dblog/dblog.module
old mode 100644
new mode 100755
index 4a1326c..b417644
--- a/modules/dblog/dblog.module
+++ b/modules/dblog/dblog.module
@@ -129,27 +129,42 @@ function _dblog_get_message_types() {
  * Implementation of hook_watchdog().
  */
 function dblog_watchdog($log = array()) {
-  $current_db = db_set_active();
-  db_query("INSERT INTO {watchdog}
-    (uid, type, message, variables, severity, link, location, referer, hostname, timestamp)
-    VALUES
-    (%d, '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', %d)",
-    $log['user']->uid,
-    $log['type'],
-    $log['message'],
-    serialize($log['variables']),
-    $log['severity'],
-    $log['link'],
-    $log['request_uri'],
-    $log['referer'],
-    $log['ip'],
-    $log['timestamp']);
-
-  if ($current_db) {
-    db_set_active($current_db);
+	$levels = variable_get('dblog_levels', dblog_watchdog_severity_levels());
+	if (empty($levels)===FALSE && in_array($log['severity'],$levels)===TRUE) {
+	  $current_db = db_set_active();
+	  db_query("INSERT INTO {watchdog}
+		(uid, type, message, variables, severity, link, location, referer, hostname, timestamp)
+		VALUES
+		(%d, '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', %d)",
+		$log['user']->uid,
+		$log['type'],
+		$log['message'],
+		serialize($log['variables']),
+		$log['severity'],
+		$log['link'],
+		$log['request_uri'],
+		$log['referer'],
+		$log['ip'],
+		$log['timestamp']);
+
+	  if ($current_db) {
+		db_set_active($current_db);
+	  }
   }
 }
 
+function dblog_watchdog_severity_levels(){
+	static $levels;
+	if(empty($levels)===FALSE){
+		return $levels;
+	}
+	$watchdog_levels = watchdog_severity_levels();
+	foreach($watchdog_levels as $level=>$label){
+		$levels[$level] = $level.' - '.$label;
+	}
+	return $levels;
+}
+
 /**
  * Theme dblog administration filter selector.
  *
