diff --git a/core/modules/search/config/install/search.settings.yml b/core/modules/search/config/install/search.settings.yml
index 09c09cb..10a4f01 100644
--- a/core/modules/search/config/install/search.settings.yml
+++ b/core/modules/search/config/install/search.settings.yml
@@ -17,3 +17,4 @@ index:
     strong: 3
     em: 3
     a: 10
+logging: false
diff --git a/core/modules/search/config/schema/search.schema.yml b/core/modules/search/config/schema/search.schema.yml
index 3be192c..450c60c 100644
--- a/core/modules/search/config/schema/search.schema.yml
+++ b/core/modules/search/config/schema/search.schema.yml
@@ -63,6 +63,9 @@ search.settings:
             a:
               type: integer
               label: 'Tag a weight'
+    logging:
+      type: boolean
+      label: 'Log searches'
 
 search.page.*:
   type: config_entity
diff --git a/core/modules/search/src/Controller/SearchController.php b/core/modules/search/src/Controller/SearchController.php
index 20ce39a..7865c82 100644
--- a/core/modules/search/src/Controller/SearchController.php
+++ b/core/modules/search/src/Controller/SearchController.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\search\Controller;
 
+use Drupal\Core\Config\ConfigFactory;
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\search\SearchPageInterface;
 use Drupal\search\SearchPageRepositoryInterface;
@@ -26,13 +27,23 @@ class SearchController extends ControllerBase {
   protected $searchPageRepository;
 
   /**
+   * The configuration factory.
+   *
+   * @var \Drupal\Core\Config\ConfigFactory
+   */
+  protected $configFactory;
+
+  /**
    * Constructs a new search controller.
    *
    * @param \Drupal\search\SearchPageRepositoryInterface $search_page_repository
    *   The search page repository.
+   * @param \Drupal\Core\Config\ConfigFactory $factory
+   *   The configuration factory object.
    */
-  public function __construct(SearchPageRepositoryInterface $search_page_repository) {
+  public function __construct(SearchPageRepositoryInterface $search_page_repository, ConfigFactory $factory) {
     $this->searchPageRepository = $search_page_repository;
+    $this->configFactory = $factory;
   }
 
   /**
@@ -40,7 +51,8 @@ public function __construct(SearchPageRepositoryInterface $search_page_repositor
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('search.search_page_repository')
+      $container->get('search.search_page_repository'),
+      $container->get('config.factory')
     );
   }
 
@@ -75,7 +87,9 @@ public function view(Request $request, SearchPageInterface $entity) {
     if ($request->query->has('keys')) {
       if ($plugin->isSearchExecutable()) {
         // Log the search.
-        watchdog('search', 'Searched %type for %keys.', array('%keys' => $keys, '%type' => $entity->label()), WATCHDOG_NOTICE);
+        if ($this->configFactory->get('search.settings')->get('logging')) {
+          watchdog('search', 'Searched %type for %keys.', array('%keys' => $keys, '%type' => $entity->label()), WATCHDOG_NOTICE);
+        }
 
         // Collect the search results.
         $results = $plugin->buildResults();
diff --git a/core/modules/search/src/SearchPageListBuilder.php b/core/modules/search/src/SearchPageListBuilder.php
index d9bb5e3..10630f6 100644
--- a/core/modules/search/src/SearchPageListBuilder.php
+++ b/core/modules/search/src/SearchPageListBuilder.php
@@ -208,6 +208,20 @@ public function buildForm(array $form, array &$form_state) {
       '#description' => $this->t('Whether to apply a simple Chinese/Japanese/Korean tokenizer based on overlapping sequences. Turn this off if you want to use an external preprocessor for this instead. Does not affect other languages.')
     );
 
+    // Indexing settings:
+    $form['logging'] = array(
+      '#type' => 'details',
+      '#title' => $this->t('Logging'),
+      '#open' => TRUE,
+    );
+
+    $form['logging']['logging'] = array(
+      '#type' => 'checkbox',
+      '#title' => $this->t('Log searches'),
+      '#default_value' => $search_settings->get('logging'),
+      '#description' => $this->t('If checked, all searches will be logged. Uncheck to skip logging. Logging may affect performance.'),
+    );
+
     $form['search_pages'] = array(
       '#type' => 'details',
       '#title' => $this->t('Search pages'),
@@ -305,6 +319,7 @@ public function submitForm(array &$form, array &$form_state) {
 
     $search_settings
       ->set('index.cron_limit', $form_state['values']['cron_limit'])
+      ->set('logging', $form_state['values']['logging'])
       ->save();
 
     drupal_set_message($this->t('The configuration options have been saved.'));
diff --git a/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php b/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php
index 6e57d95..6f9f1f6 100644
--- a/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php
+++ b/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php
@@ -39,7 +39,7 @@ function setUp() {
     parent::setUp();
 
     // Login as a user that can create and search content.
-    $this->search_user = $this->drupalCreateUser(array('search content', 'administer search', 'administer nodes', 'bypass node access', 'access user profiles', 'administer users', 'administer blocks'));
+    $this->search_user = $this->drupalCreateUser(array('search content', 'administer search', 'administer nodes', 'bypass node access', 'access user profiles', 'administer users', 'administer blocks', 'access site reports'));
     $this->drupalLogin($this->search_user);
 
     // Add a single piece of content and index it.
@@ -85,6 +85,21 @@ function testSearchSettingsPage() {
     );
     $this->drupalPostForm('admin/config/search/pages', $edit, t('Save configuration'));
     $this->assertNoText(t('The configuration options have been saved.'), 'Form does not save with an invalid word length.');
+
+    // Test logging setting. It should be on by default.
+    $text = $this->randomName(5);
+    $this->drupalPostForm('search/node', array('keys' => $text), t('Search'));
+    $this->drupalGet('admin/reports/dblog');
+    $this->assertLink('Searched Content for ' . $text . '.', 0, 'Search was logged');
+
+    // Turn off logging.
+    $edit = array('logging' => FALSE);
+    $this->drupalPostForm('admin/config/search/pages', $edit, t('Save configuration'));
+    $text = $this->randomName(5);
+    $this->drupalPostForm('search/node', array('keys' => $text), t('Search'));
+    $this->drupalGet('admin/reports/dblog');
+    $this->assertNoLink('Searched Content for ' . $text . '.', 'Search was not logged');
+
   }
 
   /**
