Change record status: 
Project: 
Introduced in branch: 
8.x-5.x
Introduced in version: 
8.x-5.0-rc30
Description: 

Tasks related to dedicated submission logging are now handled by the submodule 'webform_submission_log'.

The submodule will be automatically enabled upon running update hooks as long as there is at least one webform that currently has logging enabled in your Drupal instance.

That being said, you as a developer should familiarize with the following API changes:

  • Now the log message ({webform_submission_log}.message column) is stored untranslated and gets translated at the moment of displaying/rendering. This forces us to introduce an additional {webform_submission_log}.variables column where translation vars will be stored.
  • The proper way to log anything into {webform_submission_log} table is \Drupal::logger('webform_submission')->info('Something happened to @webform_submission_title', ['webform_submission' => $webform_submission, '@webform_submission_title' => $webform_submission->label()]). Do include the webform submission object under the key webform_submission in the $context array. Have a look at EmailWebformHandler for example of logging.
  • All other means of logging into {webform_submission_log} stand deprecated as of now. This includes WebformHandlerBase::log() and WebformSubmissionStorageInterface::log().
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done