diff --git a/db_maintenance.module b/db_maintenance.module index b79098f..23388b5 100644 --- a/db_maintenance.module +++ b/db_maintenance.module @@ -154,7 +154,9 @@ function db_maintenance_optimize_tables() { } // Return to the previously set database. db_set_active($previous); - watchdog('db_maintenance', 'Optimized @table table in @db database.', array('@db' => $db_name, '@table' => $table_name), WATCHDOG_DEBUG); + if (variable_get('db_maintenance_log', 0)) { + watchdog('db_maintenance', 'Optimized @table table in @db database.', array('@db' => $db_name, '@table' => $table_name), WATCHDOG_DEBUG); + } } if (variable_get('db_maintenance_log', 0)) { $tables = implode(', ', $config_tables);