You are here

public function WebformSubmissionStorageInterface::log in Webform 8.5

Write an event to the webform submission log.

Parameters

\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.

array $context: The values/context to be logged includes 'handler_id', 'operation', 'message', and 'data'.

Deprecated

Instead call the 'webform_submission' logger channel directly.

$message = 'Some message with an %argument.' $context = [ '%argument' => 'Some value' 'link' => $webform_submission->toLink($this->t('Edit'), 'edit-form')->toString(), 'webform_submission' => $webform_submission, 'handler_id' => NULL, 'data' => [], ]; \Drupal::logger('webform_submission')->notice($message, $context);

1 method overrides WebformSubmissionStorageInterface::log()
WebformSubmissionStorage::log in src/WebformSubmissionStorage.php
Write an event to the webform submission log.

File

src/WebformSubmissionStorageInterface.php, line 591

Class

WebformSubmissionStorageInterface
Defines an interface for webform submission classes.

Namespace

Drupal\webform

Code

public function log(WebformSubmissionInterface $webform_submission, array $context = []);