Unlimitted entries in Watchdog table I need to set watchdog log entries to unlimitted. Now it clears every time when cron is called.

admin/settings/logging/dblog


now maximum is 100000, is there any better way to do this.
Just change the setting to "ALL" that should work. Please see the screen below !



Cron will run only if minimum limit is set in the select box see the below code in dblog module.

function dblog_cron() {
  // Cleanup the watchdog table.
  $row_limit = variable_get('dblog_row_limit', 1000);

  // For row limit n, get the wid of the nth row in descending wid order.
  // Counting the most recent n rows avoids issues with wid number sequences,
  // e.g. auto_increment value &gt; 1 or rows deleted directly from the table.
  if ($row_limit &gt; 0) {
    $min_row = db_select('watchdog', 'w')
      -&gt;fields('w', array('wid'))
      -&gt;orderBy('wid', 'DESC')
      -&gt;range($row_limit - 1, 1)
      -&gt;execute()-&gt;fetchField();

    // Delete all table entries older than the nth row, if nth row was found.
    if ($min_row) {
      db_delete('watchdog')
        -&gt;condition('wid', $min_row, '&lt;')
        -&gt;execute();
    }
  }
}


If we select value as "ALL" which is 0, Cron won't delete any entries !

For Drupal 6,

You can use Elysia Cron module, to turn off the dblog_cron feature.

Elysia Cron Module tells,


  Turn off (disable) a cron task/feature you don't need.