diff --git a/core/modules/dblog/dblog.admin.inc b/core/modules/dblog/dblog.admin.inc
index 2b08878..fc9e411 100644
--- a/core/modules/dblog/dblog.admin.inc
+++ b/core/modules/dblog/dblog.admin.inc
@@ -5,11 +5,12 @@
  * Administrative page callbacks for the Database Logging module.
  */
 
-use Drupal\Core\Logger\RfcLogLevel;
-
 /**
  * Creates a list of database log administration filters that can be applied.
  *
+ * @deprecated in Drupal 8.4.x and will be removed before 9.0.0. Use
+ *   Drupal\dblog\Form\DblogFilterForm::logFilters() instead.
+ *
  * @return array
  *   Associative array of filters. The top-level keys are used as the form
  *   element names for the filters, and the values are arrays with the following
@@ -19,25 +20,5 @@
  *   - options: Array of options for the select list for the filter.
  */
 function dblog_filters() {
-  $filters = array();
-
-  foreach (_dblog_get_message_types() as $type) {
-    $types[$type] = t($type);
-  }
-
-  if (!empty($types)) {
-    $filters['type'] = array(
-      'title' => t('Type'),
-      'where' => "w.type = ?",
-      'options' => $types,
-    );
-  }
-
-  $filters['severity'] = array(
-    'title' => t('Severity'),
-    'where' => 'w.severity = ?',
-    'options' => RfcLogLevel::getLevels(),
-  );
-
-  return $filters;
+  return \Drupal\dblog\Form\DblogFilterForm::logFilters();
 }
diff --git a/core/modules/dblog/src/Controller/DbLogController.php b/core/modules/dblog/src/Controller/DbLogController.php
index 36ee204..38ea2f5 100644
--- a/core/modules/dblog/src/Controller/DbLogController.php
+++ b/core/modules/dblog/src/Controller/DbLogController.php
@@ -125,8 +125,6 @@ public function overview() {
 
     $classes = static::getLogLevelClassMap();
 
-    $this->moduleHandler->loadInclude('dblog', 'admin.inc');
-
     $build['dblog_filter_form'] = $this->formBuilder->getForm('Drupal\dblog\Form\DblogFilterForm');
 
     $header = array(
@@ -306,9 +304,7 @@ protected function buildFilterQuery() {
       return;
     }
 
-    $this->moduleHandler->loadInclude('dblog', 'admin.inc');
-
-    $filters = dblog_filters();
+    $filters = \Drupal\dblog\Form\DblogFilterForm::logFilters();
 
     // Build query.
     $where = $args = array();
diff --git a/core/modules/dblog/src/Form/DblogFilterForm.php b/core/modules/dblog/src/Form/DblogFilterForm.php
index 0434f12..64d0fbf 100644
--- a/core/modules/dblog/src/Form/DblogFilterForm.php
+++ b/core/modules/dblog/src/Form/DblogFilterForm.php
@@ -4,6 +4,7 @@
 
 use Drupal\Core\Form\FormBase;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Logger\RfcLogLevel;
 
 /**
  * Provides the database logging filter form.
@@ -21,7 +22,7 @@ public function getFormId() {
    * {@inheritdoc}
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
-    $filters = dblog_filters();
+    $filters = $this->logFilters();
 
     $form['filters'] = array(
       '#type' => 'details',
@@ -73,7 +74,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
    * {@inheritdoc}
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
-    $filters = dblog_filters();
+    $filters = $this->logFilters();
     foreach ($filters as $name => $filter) {
       if ($form_state->hasValue($name)) {
         $_SESSION['dblog_overview_filter'][$name] = $form_state->getValue($name);
@@ -93,4 +94,39 @@ public function resetForm(array &$form, FormStateInterface $form_state) {
     $_SESSION['dblog_overview_filter'] = array();
   }
 
+  /**
+   * Creates a list of database log administration filters that can be applied.
+   *
+   * @return array
+   *   Associative array of filters. The top-level keys are used as the form
+   *   element names for the filters, and the values are arrays with the following
+   *   elements:
+   *   - title: Title of the filter.
+   *   - where: The filter condition.
+   *   - options: Array of options for the select list for the filter.
+   */
+  public static function logFilters() {
+    $filters = array();
+
+    foreach (_dblog_get_message_types() as $type) {
+      $types[$type] = $this->t($type);
+    }
+
+    if (!empty($types)) {
+      $filters['type'] = array(
+        'title' => t('Type'),
+        'where' => "w.type = ?",
+        'options' => $types,
+      );
+    }
+
+    $filters['severity'] = array(
+      'title' => t('Severity'),
+      'where' => 'w.severity = ?',
+      'options' => RfcLogLevel::getLevels(),
+    );
+
+    return $filters;
+  }
+
 }
