Skip to content
Snippets Groups Projects

Resolve #3196547 "Add a process plugin to log data to watchdog table"

Open Resolve #3196547 "Add a process plugin to log data to watchdog table"
2 unresolved threads
Open Bhanu D requested to merge issue/migrate_plus-3196547:3196547-add-a-process into 8.x-5.x
2 unresolved threads

Closes #3196547

Edited by Bhanu D

Merge request reports

Members who can merge are allowed to add commits.
Approval is optional
Ready to merge by members who can write to the target branch.
  • The source branch is 5 commits behind the target branch.
  • 1 commit will be added to 8.x-5.x.
  • Source branch will be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Benji Fisher
  • Benji Fisher
  • Bhanu D added 1 commit

    added 1 commit

    Compare with previous version

  • Bhanu D added 1 commit

    added 1 commit

    Compare with previous version

  • Bhanu D added 1 commit

    added 1 commit

    Compare with previous version

  • Bhanu D resolved all threads

    resolved all threads

  • Bhanu D added 6 commits

    added 6 commits

    Compare with previous version

  • 46 * Constructs a Logger plugin.
    47 *
    48 * @param array $configuration
    49 * The plugin configuration.
    50 * @param string $plugin_id
    51 * The plugin ID.
    52 * @param mixed $plugin_definition
    53 * The plugin definition.
    54 * @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $logger
    55 * The logger service.
    56 */
    57 public function __construct(array $configuration, $plugin_id, $plugin_definition, LoggerChannelFactoryInterface $logger) {
    58 parent::__construct($configuration, $plugin_id, $plugin_definition);
    59 $this->logger = $logger->get('migrate_plus');
    60
    61 $methods = ['info', 'notice', 'error', 'warning'];
  • 116 ->toArray(), TRUE);
    117 }
    118 elseif (is_string($value) || is_numeric($value) || is_array($value)) {
    119 $export = print_r($value, TRUE);
    120 }
    121 elseif ($is_object && method_exists($value, '__toString')) {
    122 $export = print_r((string) $value, TRUE);
    123 }
    124 else {
    125 $export = NULL;
    126 }
    127 $class_name = $export !== NULL && $is_object ? $class_name = get_class($value) . ":\n" : '';
    128 $message = $export === NULL ? "Unable to log the value for '{$destination_property}'" : "'{$destination_property}' value is {$class_name}'{$export}'";
    129
    130 // Log the value.
    131 $this->logger->{$this->loggerMethod}($message);
  • Bhanu D added 42 commits

    added 42 commits

    Compare with previous version

  • Bhanu D added 1 commit

    added 1 commit

    Compare with previous version

  • Bhanu D added 1 commit

    added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading