Skip to content

Conversation

@larskemper
Copy link
Member

@larskemper larskemper commented Aug 28, 2025

resolves #11977

@larskemper larskemper marked this pull request as ready for review August 28, 2025 12:31
@larskemper larskemper merged commit b50abbf into feature/migration-logging-refactor Aug 29, 2025
7 checks passed
@larskemper larskemper deleted the feat/fill-logs-with-meaningful-data branch August 29, 2025 11:23
larskemper added a commit that referenced this pull request Oct 29, 2025
# Conflicts:
#	src/Profile/Shopware/Converter/CustomerConverter.php

diff --git c/src/Profile/Shopware/Converter/CategoryConverter.php i/src/Profile/Shopware/Converter/CategoryConverter.php
index 6ce10089..b1797092 100644
--- c/src/Profile/Shopware/Converter/CategoryConverter.php
+++ i/src/Profile/Shopware/Converter/CategoryConverter.php
@@ -85,8 +85,11 @@ abstract class CategoryConverter extends ShopwareConverter
         $this->connectionName = $connection->getName();

         if (!isset($data['_locale'])) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(CategoryDefinition::ENTITY_NAME)
+                    ->withFieldSourcePath('_locale')
+                    ->withSourceData($data)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

diff --git c/src/Profile/Shopware/Converter/CrossSellingConverter.php i/src/Profile/Shopware/Converter/CrossSellingConverter.php
index a6627689..715254e9 100644
--- c/src/Profile/Shopware/Converter/CrossSellingConverter.php
+++ i/src/Profile/Shopware/Converter/CrossSellingConverter.php
@@ -7,6 +7,7 @@

 namespace SwagMigrationAssistant\Profile\Shopware\Converter;

+use Shopware\Core\Content\Product\Aggregate\ProductCrossSelling\ProductCrossSellingDefinition;
 use Shopware\Core\Framework\Context;
 use Shopware\Core\Framework\Log\Package;
 use SwagMigrationAssistant\Migration\Converter\ConvertStruct;
@@ -59,8 +60,13 @@ abstract class CrossSellingConverter extends ShopwareConverter

         $sourceProductMapping = $this->getProductMapping($data['articleID']);
         if ($sourceProductMapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(ProductCrossSellingDefinition::ENTITY_NAME)
+                    ->withFieldName('id')
+                    ->withFieldSourcePath('articleID')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(AssociationRequiredMissingLog::class)
             );

@@ -70,8 +76,13 @@ abstract class CrossSellingConverter extends ShopwareConverter

         $relatedProductMapping = $this->getProductMapping($data['relatedarticle']);
         if ($relatedProductMapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(ProductCrossSellingDefinition::ENTITY_NAME)
+                    ->withFieldName('id')
+                    ->withFieldSourcePath('relatedarticle')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(AssociationRequiredMissingLog::class)
             );

diff --git c/src/Profile/Shopware/Converter/CustomerConverter.php i/src/Profile/Shopware/Converter/CustomerConverter.php
index 71d8eb29..0fef97a5 100644
--- c/src/Profile/Shopware/Converter/CustomerConverter.php
+++ i/src/Profile/Shopware/Converter/CustomerConverter.php
@@ -7,6 +7,8 @@

 namespace SwagMigrationAssistant\Profile\Shopware\Converter;

+use Shopware\Core\Checkout\Customer\Aggregate\CustomerAddress\CustomerAddressDefinition;
+use Shopware\Core\Checkout\Customer\CustomerDefinition;
 use Shopware\Core\Checkout\Customer\CustomerEntity;
 use Shopware\Core\Defaults;
 use Shopware\Core\Framework\Context;
@@ -108,8 +110,12 @@ abstract class CustomerConverter extends ShopwareConverter
         $fields = $this->checkForEmptyRequiredDataFields($data, $this->requiredDataFieldKeys);

         if (!empty($fields)) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
-                SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+            $this->loggingService->addLogForEach(
+                $fields,
+                fn (string $key) => SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(CustomerDefinition::ENTITY_NAME)
+                    ->withFieldSourcePath($key)
+                    ->withSourceData($data)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

@@ -117,8 +123,12 @@ abstract class CustomerConverter extends ShopwareConverter
         }

         if (!$this->checkEmailValidity($data['email'])) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(CustomerDefinition::ENTITY_NAME)
+                    ->withFieldName('email')
+                    ->withFieldSourcePath('email')
+                    ->withSourceData($data)
                     ->build(InvalidEmailAddressLog::class)
             );

@@ -229,8 +239,13 @@ abstract class CustomerConverter extends ShopwareConverter
             );

             if ($mapping === null) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                        ->withEntityName(CustomerDefinition::ENTITY_NAME)
+                        ->withFieldName('defaultPaymentMethodId')
+                        ->withFieldSourcePath('default_payment_method')
+                        ->withSourceData($data)
+                        ->withConvertedData($converted)
                         ->build(EmptyNecessaryFieldRunLog::class)
                 );

@@ -286,11 +301,30 @@ abstract class CustomerConverter extends ShopwareConverter
             $returnData = null;
         }

-        if (!isset($converted['defaultBillingAddressId'], $converted['defaultShippingAddressId'])) {
+        if (!isset($converted['defaultBillingAddressId'])) {
             $this->mappingService->deleteMapping($converted['id'], $this->connectionId, $this->context);

-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(CustomerDefinition::ENTITY_NAME)
+                    ->withFieldName('defaultBillingAddressId')
+                    ->withFieldSourcePath('default_billing_address_id')
+                    ->withSourceData($data)
+                    ->build(EmptyNecessaryFieldRunLog::class)
+            );
+
+            return new ConvertStruct(null, $oldData);
+        }
+
+        if (!isset($converted['defaultShippingAddressId'])) {
+            $this->mappingService->deleteMapping($converted['id'], $this->connectionId, $this->context);
+
+            $this->loggingService->addLogEntry(
+                SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(CustomerDefinition::ENTITY_NAME)
+                    ->withFieldName('defaultShippingAddressId')
+                    ->withFieldSourcePath('default_shipping_address_id')
+                    ->withSourceData($data)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

@@ -334,8 +368,12 @@ abstract class CustomerConverter extends ShopwareConverter
         );

         if ($paymentMethodMapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(CustomerDefinition::ENTITY_NAME)
+                    ->withFieldName('defaultPaymentMethodId')
+                    ->withFieldSourcePath('default_payment_method')
+                    ->withSourceData($originalData)
                     ->build(UnknownEntityLog::class)
             );

@@ -359,8 +397,12 @@ abstract class CustomerConverter extends ShopwareConverter

             $fields = $this->checkForEmptyRequiredDataFields($address, $this->requiredAddressDataFieldKeys);
             if (!empty($fields)) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
-                    SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                $this->loggingService->addLogForEach(
+                    $fields,
+                    fn (string $key) => SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                        ->withEntityName(CustomerAddressDefinition::ENTITY_NAME)
+                        ->withFieldSourcePath($key)
+                        ->withSourceData($address)
                         ->build(EmptyNecessaryFieldRunLog::class)
                 );

@@ -541,8 +583,12 @@ abstract class CustomerConverter extends ShopwareConverter
         $state = ['countryId' => $newCountryId];

         if (!isset($oldAddressData['state_id'], $oldAddressData['country']['countryiso'], $oldAddressData['state']['shortcode'])) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(CustomerAddressDefinition::ENTITY_NAME)
+                    ->withFieldName('stateId')
+                    ->withFieldSourcePath('state_id')
+                    ->withSourceData($oldAddressData)
                     ->build(UnknownEntityLog::class)
             );

@@ -574,8 +620,12 @@ abstract class CustomerConverter extends ShopwareConverter
             $oldAddressData['state']['position'],
             $oldAddressData['state']['active']
         )) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(CustomerAddressDefinition::ENTITY_NAME)
+                    ->withFieldName('stateId')
+                    ->withFieldSourcePath('state.name')
+                    ->withSourceData($oldAddressData['state'])
                     ->build(UnknownEntityLog::class)
             );

@@ -645,8 +695,16 @@ abstract class CustomerConverter extends ShopwareConverter
             $converted['defaultShippingAddressId'] = $addresses[0]['id'];
             unset($originalData['default_billing_address_id'], $originalData['default_shipping_address_id']);

-            $this->loggingService->addLogEntry( // TODO: add optional fields
-                SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+            $this->loggingService->addLogForEach(
+                [
+                    'defaultBillingAddressId' => 'default_billing_address_id',
+                    'defaultShippingAddressId' => 'default_shipping_address_id',
+                ],
+                fn (string $key, string $value) => SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(CustomerAddressDefinition::ENTITY_NAME)
+                    ->withFieldName($key)
+                    ->withFieldSourcePath($value)
+                    ->withSourceData($originalData)
                     ->build(FieldReassignedRunLog::class)
             );
         }
@@ -662,8 +720,12 @@ abstract class CustomerConverter extends ShopwareConverter
             $converted['defaultShippingAddressId'] = $converted['defaultBillingAddressId'];
             unset($originalData['default_shipping_address_id']);

-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(CustomerAddressDefinition::ENTITY_NAME)
+                    ->withFieldName('defaultShippingAddressId')
+                    ->withFieldSourcePath('default_shipping_address_id')
+                    ->withSourceData($originalData)
                     ->build(FieldReassignedRunLog::class)
             );
         }
@@ -679,8 +741,12 @@ abstract class CustomerConverter extends ShopwareConverter
             $converted['defaultBillingAddressId'] = $converted['defaultShippingAddressId'];
             unset($originalData['default_billing_address_id']);

-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(CustomerAddressDefinition::ENTITY_NAME)
+                    ->withFieldName('defaultBillingAddressId')
+                    ->withFieldSourcePath('default_billing_address_id')
+                    ->withSourceData($originalData)
                     ->build(FieldReassignedRunLog::class)
             );
         }
@@ -696,8 +762,12 @@ abstract class CustomerConverter extends ShopwareConverter
         );

         if ($mapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(CustomerDefinition::ENTITY_NAME)
+                    ->withFieldName('salutationId')
+                    ->withFieldSourcePath('salutation')
+                    ->withSourceData(['salutation' => $salutation])
                     ->build(UnknownEntityLog::class)
             );

diff --git c/src/Profile/Shopware/Converter/LanguageConverter.php i/src/Profile/Shopware/Converter/LanguageConverter.php
index 04822064..954c1b6b 100644
--- c/src/Profile/Shopware/Converter/LanguageConverter.php
+++ i/src/Profile/Shopware/Converter/LanguageConverter.php
@@ -9,6 +9,7 @@ namespace SwagMigrationAssistant\Profile\Shopware\Converter;

 use Shopware\Core\Framework\Context;
 use Shopware\Core\Framework\Log\Package;
+use Shopware\Core\System\Language\LanguageDefinition;
 use SwagMigrationAssistant\Migration\Converter\ConvertStruct;
 use SwagMigrationAssistant\Migration\DataSelection\DefaultEntities;
 use SwagMigrationAssistant\Migration\Logging\Log\Builder\SwagMigrationLogBuilder;
@@ -50,8 +51,11 @@ abstract class LanguageConverter extends ShopwareConverter

         $languageUuid = $this->languageLookup->get($data['locale'], $context);
         if ($languageUuid !== null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(LanguageDefinition::ENTITY_NAME)
+                    ->withFieldSourcePath('locale')
+                    ->withSourceData($data)
                     ->build(EntityAlreadyExistsRunLog::class)
             );

diff --git c/src/Profile/Shopware/Converter/MainVariantRelationConverter.php i/src/Profile/Shopware/Converter/MainVariantRelationConverter.php
index f76cd714..c8ad2b43 100644
--- c/src/Profile/Shopware/Converter/MainVariantRelationConverter.php
+++ i/src/Profile/Shopware/Converter/MainVariantRelationConverter.php
@@ -109,12 +109,11 @@ abstract class MainVariantRelationConverter extends ShopwareConverter
      */
     private function addAssociationRequiredLog(MigrationContextInterface $migrationContext, string $field, string $entity, array $data): void
     {
-        $this->loggingService->addLogEntry( // TODO: add optional fields
+        $this->loggingService->addLogEntry(
             SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
                 ->withEntityName($entity)
-                ->withFieldName($field)
                 ->withFieldSourcePath($field)
-                ->withSourceData([$data])
+                ->withSourceData($data)
                 ->build(AssociationRequiredMissingLog::class)
         );
     }
diff --git c/src/Profile/Shopware/Converter/NewsletterRecipientConverter.php i/src/Profile/Shopware/Converter/NewsletterRecipientConverter.php
index aa6641c3..2c9ba19a 100644
--- c/src/Profile/Shopware/Converter/NewsletterRecipientConverter.php
+++ i/src/Profile/Shopware/Converter/NewsletterRecipientConverter.php
@@ -161,8 +161,11 @@ abstract class NewsletterRecipientConverter extends ShopwareConverter
         );

         if ($salutationMapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(NewsletterRecipientDefinition::ENTITY_NAME)
+                    ->withFieldName('salutationId')
+                    ->withSourceData(['salutation' => $salutation])
                     ->build(UnknownEntityLog::class)
             );

@@ -188,8 +191,12 @@ abstract class NewsletterRecipientConverter extends ShopwareConverter
         }

         if (!isset($salesChannelMapping)) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(NewsletterRecipientDefinition::ENTITY_NAME)
+                    ->withFieldName('salesChannelId')
+                    ->withFieldSourcePath('shopId')
+                    ->withSourceData($data)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

@@ -210,8 +217,11 @@ abstract class NewsletterRecipientConverter extends ShopwareConverter
         );

         if ($status === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(NewsletterRecipientDefinition::ENTITY_NAME)
+                    ->withFieldName('status')
+                    ->withSourceData(['status' => NewsletterRecipientStatusReader::SOURCE_ID])
                     ->build(EmptyNecessaryFieldRunLog::class)
             );
         }
diff --git c/src/Profile/Shopware/Converter/NumberRangeConverter.php i/src/Profile/Shopware/Converter/NumberRangeConverter.php
index 48e3e411..93fc5e4a 100644
--- c/src/Profile/Shopware/Converter/NumberRangeConverter.php
+++ i/src/Profile/Shopware/Converter/NumberRangeConverter.php
@@ -14,6 +14,7 @@ use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
 use Shopware\Core\Framework\Log\Package;
 use Shopware\Core\Framework\Uuid\Uuid;
 use Shopware\Core\System\NumberRange\NumberRangeCollection;
+use Shopware\Core\System\NumberRange\NumberRangeDefinition;
 use Shopware\Core\System\NumberRange\NumberRangeEntity;
 use SwagMigrationAssistant\Migration\Converter\ConvertStruct;
 use SwagMigrationAssistant\Migration\DataSelection\DefaultEntities;
@@ -72,8 +73,12 @@ abstract class NumberRangeConverter extends ShopwareConverter
         $this->connectionId = $connection->getId();

         if (!\array_key_exists($data['name'], self::TYPE_MAPPING)) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(NumberRangeDefinition::ENTITY_NAME)
+                    ->withFieldName('typeId')
+                    ->withFieldSourcePath('name')
+                    ->withSourceData($data)
                     ->build(UnsupportedNumberRangeTypeLog::class)
             );

@@ -85,8 +90,12 @@ abstract class NumberRangeConverter extends ShopwareConverter
         $converted['typeId'] = $this->getProductNumberRangeTypeUuid($data['name']);

         if (empty($converted['typeId'])) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(NumberRangeDefinition::ENTITY_NAME)
+                    ->withFieldName('typeId')
+                    ->withFieldSourcePath('name')
+                    ->withSourceData($data)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

diff --git c/src/Profile/Shopware/Converter/OrderConverter.php i/src/Profile/Shopware/Converter/OrderConverter.php
index 3a852bca..9f961cd2 100644
--- c/src/Profile/Shopware/Converter/OrderConverter.php
+++ i/src/Profile/Shopware/Converter/OrderConverter.php
@@ -17,6 +17,11 @@ use Shopware\Core\Checkout\Cart\Tax\Struct\CalculatedTaxCollection;
 use Shopware\Core\Checkout\Cart\Tax\Struct\TaxRule;
 use Shopware\Core\Checkout\Cart\Tax\Struct\TaxRuleCollection;
 use Shopware\Core\Checkout\Cart\Tax\TaxCalculator;
+use Shopware\Core\Checkout\Order\Aggregate\OrderAddress\OrderAddressDefinition;
+use Shopware\Core\Checkout\Order\Aggregate\OrderDelivery\OrderDeliveryDefinition;
+use Shopware\Core\Checkout\Order\Aggregate\OrderLineItem\OrderLineItemDefinition;
+use Shopware\Core\Checkout\Order\Aggregate\OrderTransaction\OrderTransactionDefinition;
+use Shopware\Core\Checkout\Order\OrderDefinition;
 use Shopware\Core\Defaults;
 use Shopware\Core\Framework\Context;
 use Shopware\Core\Framework\DataAbstractionLayer\EntityRepository;
@@ -132,8 +137,12 @@ abstract class OrderConverter extends ShopwareConverter
         }

         if (!empty($fields)) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
-                SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+            $this->loggingService->addLogForEach(
+                $fields,
+                fn (string $key) => SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(OrderDefinition::ENTITY_NAME)
+                    ->withFieldSourcePath($key)
+                    ->withSourceData($data)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

@@ -211,8 +220,13 @@ abstract class OrderConverter extends ShopwareConverter
             $currencyUuid = $this->currencyLookup->get($data['currency'], $context);
         }
         if ($currencyUuid === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(OrderDefinition::ENTITY_NAME)
+                    ->withFieldName('currencyId')
+                    ->withFieldSourcePath('currency')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

@@ -238,8 +252,13 @@ abstract class OrderConverter extends ShopwareConverter
         );

         if ($stateMapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(OrderDefinition::ENTITY_NAME)
+                    ->withFieldName('stateId')
+                    ->withFieldSourcePath('status')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(UnknownEntityLog::class)
             );

@@ -313,8 +332,13 @@ abstract class OrderConverter extends ShopwareConverter

         $billingAddress = $this->getAddress($data['billingaddress']);
         if (empty($billingAddress)) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(OrderDefinition::ENTITY_NAME)
+                    ->withFieldName('billingAddressId')
+                    ->withFieldSourcePath('billingaddress')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

@@ -417,8 +441,13 @@ abstract class OrderConverter extends ShopwareConverter
         );

         if ($mapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(OrderTransactionDefinition::ENTITY_NAME)
+                    ->withFieldName('stateId')
+                    ->withFieldSourcePath('cleared')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(UnknownEntityLog::class)
             );

@@ -472,8 +501,12 @@ abstract class OrderConverter extends ShopwareConverter
         );

         if ($paymentMethodMapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(OrderTransactionDefinition::ENTITY_NAME)
+                    ->withFieldName('paymentMethodId')
+                    ->withFieldSourcePath('payment.id')
+                    ->withSourceData($originalData)
                     ->build(UnknownEntityLog::class)
             );

@@ -495,8 +528,12 @@ abstract class OrderConverter extends ShopwareConverter
         $fields = $this->checkForEmptyRequiredDataFields($originalData, $this->requiredAddressDataFieldKeys);

         if (!empty($fields)) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
-                SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+            $this->loggingService->addLogForEach(
+                $fields,
+                fn (string $key) => SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(OrderDefinition::ENTITY_NAME)
+                    ->withFieldSourcePath($key)
+                    ->withSourceData($originalData)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

@@ -638,8 +675,12 @@ abstract class OrderConverter extends ShopwareConverter
         $state = ['countryId' => $newCountryId];

         if (!isset($oldAddressData['stateID'], $oldAddressData['country']['countryiso'], $oldAddressData['state']['shortcode'])) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(OrderAddressDefinition::ENTITY_NAME)
+                    ->withFieldName('countryStateId')
+                    ->withFieldSourcePath('stateID')
+                    ->withSourceData($oldAddressData)
                     ->build(UnknownEntityLog::class)
             );

@@ -671,8 +712,12 @@ abstract class OrderConverter extends ShopwareConverter
             $oldAddressData['state']['position'],
             $oldAddressData['state']['active']
         )) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(OrderAddressDefinition::ENTITY_NAME)
+                    ->withFieldName('countryStateId')
+                    ->withFieldSourcePath('name')
+                    ->withSourceData($oldAddressData['state'])
                     ->build(UnknownEntityLog::class)
             );

@@ -747,8 +792,13 @@ abstract class OrderConverter extends ShopwareConverter
         );

         if ($deliveryStateMapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(OrderDeliveryDefinition::ENTITY_NAME)
+                    ->withFieldName('stateId')
+                    ->withFieldSourcePath('status')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(UnknownEntityLog::class)
             );

@@ -827,8 +877,12 @@ abstract class OrderConverter extends ShopwareConverter
         );

         if ($shippingMethodMapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(OrderDeliveryDefinition::ENTITY_NAME)
+                    ->withFieldName('shippingMethodId')
+                    ->withFieldSourcePath('dispatchID')
+                    ->withSourceData(['dispatchID' => $shippingMethodId])
                     ->build(UnknownEntityLog::class)
             );

@@ -991,8 +1045,12 @@ abstract class OrderConverter extends ShopwareConverter
         );

         if ($salutationMapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(OrderAddressDefinition::ENTITY_NAME)
+                    ->withFieldName('salutationId')
+                    ->withFieldSourcePath('salutation')
+                    ->withSourceData(['salutation' => $salutation])
                     ->build(UnknownEntityLog::class)
             );

@@ -1019,8 +1077,12 @@ abstract class OrderConverter extends ShopwareConverter
         );

         if (!\is_array($mediaMapping)) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(OrderLineItemDefinition::ENTITY_NAME)
+                    ->withFieldName('coverId')
+                    ->withFieldSourcePath('esd.esdID')
+                    ->withSourceData($originalEsdItem)
                     ->build(UnknownEntityLog::class)
             );

diff --git c/src/Profile/Shopware/Converter/OrderDocumentConverter.php i/src/Profile/Shopware/Converter/OrderDocumentConverter.php
index 7f1cdc68..810957ce 100644
--- c/src/Profile/Shopware/Converter/OrderDocumentConverter.php
+++ i/src/Profile/Shopware/Converter/OrderDocumentConverter.php
@@ -80,8 +80,12 @@ abstract class OrderDocumentConverter extends ShopwareConverter
         $converted = [];

         if (empty($data['hash'])) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(DocumentDefinition::ENTITY_NAME)
+                    ->withFieldSourcePath('hash')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

@@ -89,8 +93,13 @@ abstract class OrderDocumentConverter extends ShopwareConverter
         }

         if (!isset($data['documenttype'])) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(DocumentDefinition::ENTITY_NAME)
+                    ->withFieldName('documentType')
+                    ->withFieldSourcePath('documenttype')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

@@ -105,8 +114,13 @@ abstract class OrderDocumentConverter extends ShopwareConverter
         );

         if ($orderMapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(DocumentDefinition::ENTITY_NAME)
+                    ->withFieldName('orderId')
+                    ->withFieldSourcePath('orderID')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(AssociationRequiredMissingLog::class)
             );

@@ -187,8 +201,13 @@ abstract class OrderDocumentConverter extends ShopwareConverter
             return $documentType;
         }

-        $this->loggingService->addLogEntry( // TODO: add optional fields
+        $this->loggingService->addLogEntry(
             SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                ->withEntityName(DocumentDefinition::ENTITY_NAME)
+                ->withFieldName('documentType')
+                ->withFieldSourcePath('key')
+                ->withSourceData($data)
+                ->withConvertedData($documentType)
                 ->build(DocumentTypeNotSupportedLog::class)
         );

diff --git c/src/Profile/Shopware/Converter/ProductConverter.php i/src/Profile/Shopware/Converter/ProductConverter.php
index 3fd7b4e0..e958a765 100644
--- c/src/Profile/Shopware/Converter/ProductConverter.php
+++ i/src/Profile/Shopware/Converter/ProductConverter.php
@@ -7,8 +7,12 @@

 namespace SwagMigrationAssistant\Profile\Shopware\Converter;

+use Shopware\Core\Content\Media\MediaDefinition;
 use Shopware\Core\Content\Product\Aggregate\ProductDownload\ProductDownloadDefinition;
+use Shopware\Core\Content\Product\Aggregate\ProductMedia\ProductMediaDefinition;
+use Shopware\Core\Content\Product\Aggregate\ProductPrice\ProductPriceDefinition;
 use Shopware\Core\Content\Product\Aggregate\ProductVisibility\ProductVisibilityDefinition;
+use Shopware\Core\Content\Product\ProductDefinition;
 use Shopware\Core\Defaults;
 use Shopware\Core\Framework\Context;
 use Shopware\Core\Framework\Log\Package;
@@ -143,8 +147,12 @@ abstract class ProductConverter extends ShopwareConverter

         $fields = $this->checkForEmptyRequiredDataFields($data, $this->requiredDataFieldKeys);
         if (!empty($fields)) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
-                SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+            $this->loggingService->addLogForEach(
+                $fields,
+                fn (string $key) => SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(ProductDefinition::ENTITY_NAME)
+                    ->withFieldSourcePath($key)
+                    ->withSourceData($data)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

@@ -382,8 +390,13 @@ abstract class ProductConverter extends ShopwareConverter
         $converted['price'] = $this->getPrice($data['prices'][0], $converted['tax']['taxRate']);

         if (empty($converted['price'])) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(ProductDefinition::ENTITY_NAME)
+                    ->withFieldName('price')
+                    ->withFieldSourcePath('prices')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );
         }
@@ -887,8 +900,13 @@ abstract class ProductConverter extends ShopwareConverter
             $this->mappingIds[] = $mapping['id'];

             if (empty($esdFile['name'])) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                        ->withEntityName(MediaDefinition::ENTITY_NAME)
+                        ->withFieldName('name')
+                        ->withFieldSourcePath('name')
+                        ->withSourceData($esdFile)
+                        ->withConvertedData($newMedia)
                         ->build(CannotConvertChildEntityLog::class)
                 );

@@ -897,9 +915,15 @@ abstract class ProductConverter extends ShopwareConverter

             try {
                 $path = \unserialize($esdFile['path'], ['allowed_classes' => false]);
-            } catch (\Throwable) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
+            } catch (\Throwable $e) {
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                        ->withEntityName(MediaDefinition::ENTITY_NAME)
+                        ->withFieldName('path')
+                        ->withFieldSourcePath('path')
+                        ->withSourceData($esdFile)
+                        ->withExceptionMessage($e->getMessage())
+                        ->withExceptionTrace($e->getTrace())
                         ->build(CannotConvertChildEntityLog::class)
                 );

@@ -929,8 +953,15 @@ abstract class ProductConverter extends ShopwareConverter

             $albumId = $this->mediaFolderLookup->get(ProductDownloadDefinition::ENTITY_NAME, $this->context);
             if ($albumId === null) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                        ->withEntityName(MediaDefinition::ENTITY_NAME)
+                        ->withFieldName('mediaFolderId')
+                        ->withSourceData([
+                            'file_name' => $fileName,
+                            'source_data' => $sourceData,
+                            'media_folder' => ProductDownloadDefinition::ENTITY_NAME,
+                        ])
                         ->build(CannotConvertChildEntityLog::class)
                 );

@@ -961,8 +992,12 @@ abstract class ProductConverter extends ShopwareConverter
         $mediaObjects = [];
         foreach ($media as $mediaData) {
             if (!isset($mediaData['media']['id'])) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                        ->withEntityName(ProductMediaDefinition::ENTITY_NAME)
+                        ->withFieldName('mediaId')
+                        ->withFieldSourcePath('media.id')
+                        ->withSourceData($mediaData)
                         ->build(CannotConvertChildEntityLog::class)
                 );

@@ -1349,8 +1384,13 @@ abstract class ProductConverter extends ShopwareConverter
             $priceArray = $this->getPrice($price, $converted['tax']['taxRate']);

             if (empty($priceArray)) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                        ->withEntityName(ProductPriceDefinition::ENTITY_NAME)
+                        ->withFieldName('price')
+                        ->withFieldSourcePath('price')
+                        ->withSourceData($price)
+                        ->withConvertedData($converted)
                         ->build(EmptyNecessaryFieldRunLog::class)
                 );

diff --git c/src/Profile/Shopware/Converter/ProductReviewConverter.php i/src/Profile/Shopware/Converter/ProductReviewConverter.php
index 34f3afa3..3941b71b 100644
--- c/src/Profile/Shopware/Converter/ProductReviewConverter.php
+++ i/src/Profile/Shopware/Converter/ProductReviewConverter.php
@@ -7,6 +7,7 @@

 namespace SwagMigrationAssistant\Profile\Shopware\Converter;

+use Shopware\Core\Content\Product\Aggregate\ProductReview\ProductReviewDefinition;
 use Shopware\Core\Framework\Context;
 use Shopware\Core\Framework\Log\Package;
 use SwagMigrationAssistant\Migration\Converter\ConvertStruct;
@@ -46,8 +47,12 @@ abstract class ProductReviewConverter extends ShopwareConverter
         $connectionId = $connection->getId();

         if (!empty($fields)) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
-                SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+            $this->loggingService->addLogForEach(
+                $fields,
+                fn (string $key) => SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(ProductReviewDefinition::ENTITY_NAME)
+                    ->withFieldSourcePath($key)
+                    ->withSourceData($data)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

@@ -85,8 +90,13 @@ abstract class ProductReviewConverter extends ShopwareConverter
             );

             if ($mapping === null) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                        ->withEntityName(ProductReviewDefinition::ENTITY_NAME)
+                        ->withFieldName('productId')
+                        ->withFieldSourcePath('articleID')
+                        ->withSourceData($data)
+                        ->withConvertedData($converted)
                         ->build(AssociationRequiredMissingLog::class)
                 );

@@ -122,8 +132,13 @@ abstract class ProductReviewConverter extends ShopwareConverter
         );

         if ($mapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(ProductReviewDefinition::ENTITY_NAME)
+                    ->withFieldName('salesChannelId')
+                    ->withFieldSourcePath('shop_id')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(AssociationRequiredMissingLog::class)
             );

@@ -135,8 +150,13 @@ abstract class ProductReviewConverter extends ShopwareConverter

         $converted['languageId'] = $this->languageLookup->get($mainLocale, $context);
         if ($converted['languageId'] === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(ProductReviewDefinition::ENTITY_NAME)
+                    ->withFieldName('languageId')
+                    ->withFieldSourcePath('_locale')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(AssociationRequiredMissingLog::class)
             );

diff --git c/src/Profile/Shopware/Converter/PromotionConverter.php i/src/Profile/Shopware/Converter/PromotionConverter.php
index 6e68c4b3..5681ec17 100644
--- c/src/Profile/Shopware/Converter/PromotionConverter.php
+++ i/src/Profile/Shopware/Converter/PromotionConverter.php
@@ -7,7 +7,10 @@

 namespace SwagMigrationAssistant\Profile\Shopware\Converter;

+use Shopware\Core\Checkout\Promotion\Aggregate\PromotionCartRule\PromotionCartRuleDefinition;
 use Shopware\Core\Checkout\Promotion\Aggregate\PromotionDiscount\PromotionDiscountEntity;
+use Shopware\Core\Checkout\Promotion\Aggregate\PromotionPersonaRule\PromotionPersonaRuleDefinition;
+use Shopware\Core\Checkout\Promotion\PromotionDefinition;
 use Shopware\Core\Framework\Context;
 use Shopware\Core\Framework\DataAbstractionLayer\EntityRepository;
 use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
@@ -364,8 +367,12 @@ abstract class PromotionConverter extends ShopwareConverter
                 );

                 if ($productMapping === null) {
-                    $this->loggingService->addLogEntry( // TODO: add optional fields
+                    $this->loggingService->addLogEntry(
                         SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                            ->withEntityName(PromotionDefinition::ENTITY_NAME)
+                            ->withFieldName('productId')
+                            ->withFieldSourcePath('restrictarticles')
+                            ->withSourceData($data)
                             ->build(AssociationRequiredMissingLog::class)
                     );

@@ -495,8 +502,12 @@ abstract class PromotionConverter extends ShopwareConverter
                 unset($data['bindtosupplier']);
                 $oneRuleAdded = true;
             } else {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                        ->withEntityName(PromotionCartRuleDefinition::ENTITY_NAME)
+                        ->withFieldName('rule.value.manufacturerId')
+                        ->withFieldSourcePath('bindtosupplier')
+                        ->withSourceData($data)
                         ->build(AssociationRequiredMissingLog::class)
                 );
             }
@@ -546,8 +557,13 @@ abstract class PromotionConverter extends ShopwareConverter
             );

             if ($salesChannelMapping === null) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                        ->withEntityName(PromotionDefinition::ENTITY_NAME)
+                        ->withFieldName('salesChannelId')
+                        ->withFieldSourcePath('subshopID')
+                        ->withSourceData($data)
+                        ->withConvertedData($converted)
                         ->build(AssociationRequiredMissingLog::class)
                 );

@@ -614,8 +630,13 @@ abstract class PromotionConverter extends ShopwareConverter
         );

         if ($customerGroupMapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(PromotionPersonaRuleDefinition::ENTITY_NAME)
+                    ->withFieldName('rule.value.customerGroupId')
+                    ->withFieldSourcePath('customergroup')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(AssociationRequiredMissingLog::class)
             );

diff --git c/src/Profile/Shopware/Converter/PropertyGroupOptionConverter.php i/src/Profile/Shopware/Converter/PropertyGroupOptionConverter.php
index f1f12103..5537e503 100644
--- c/src/Profile/Shopware/Converter/PropertyGroupOptionConverter.php
+++ i/src/Profile/Shopware/Converter/PropertyGroupOptionConverter.php
@@ -7,6 +7,7 @@

 namespace SwagMigrationAssistant\Profile\Shopware\Converter;

+use Shopware\Core\Content\Property\PropertyGroupDefinition;
 use Shopware\Core\Framework\Context;
 use Shopware\Core\Framework\Log\Package;
 use SwagMigrationAssistant\Migration\Converter\ConvertStruct;
@@ -76,8 +77,12 @@ abstract class PropertyGroupOptionConverter extends ShopwareConverter
         $this->connectionId = $connection->getId();

         if (!isset($data['group']['name'])) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(PropertyGroupDefinition::ENTITY_NAME)
+                    ->withFieldName('id')
+                    ->withFieldSourcePath('group.name')
+                    ->withSourceData($data)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

@@ -128,8 +133,12 @@ abstract class PropertyGroupOptionConverter extends ShopwareConverter
     protected function setMedia(array &$converted, array $data): void
     {
         if (!isset($data['media']['id'])) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                    ->withEntityName(PropertyGroupDefinition::ENTITY_NAME)
+                    ->withFieldName('media.id')
+                    ->withFieldSourcePath('media.id')
+                    ->withSourceData($data)
                     ->build(CannotConvertChildEntityLog::class)
             );

diff --git c/src/Profile/Shopware/Converter/SalesChannelConverter.php i/src/Profile/Shopware/Converter/SalesChannelConverter.php
index 1e911f66..634269d8 100644
--- c/src/Profile/Shopware/Converter/SalesChannelConverter.php
+++ i/src/Profile/Shopware/Converter/SalesChannelConverter.php
@@ -20,6 +20,7 @@ use Shopware\Core\Framework\DataAbstractionLayer\Search\Sorting\FieldSorting;
 use Shopware\Core\Framework\Log\Package;
 use Shopware\Core\System\Country\CountryCollection;
 use Shopware\Core\System\SalesChannel\SalesChannelCollection;
+use Shopware\Core\System\SalesChannel\SalesChannelDefinition;
 use SwagMigrationAssistant\Migration\Converter\ConvertStruct;
 use SwagMigrationAssistant\Migration\DataSelection\DefaultEntities;
 use SwagMigrationAssistant\Migration\Logging\Log\AssociationRequiredMissingLog;
@@ -96,8 +97,12 @@ abstract class SalesChannelConverter extends ShopwareConverter
         );

         if ($customerGroupMapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(SalesChannelDefinition::ENTITY_NAME)
+                    ->withFieldName('customerGroupId')
+                    ->withFieldSourcePath('customer_group_id')
+                    ->withSourceData($data)
                     ->build(AssociationRequiredMissingLog::class)
             );

@@ -109,8 +114,12 @@ abstract class SalesChannelConverter extends ShopwareConverter

         $languageUuid = $this->languageLookup->get($data['locale'], $context);
         if ($languageUuid === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(SalesChannelDefinition::ENTITY_NAME)
+                    ->withFieldName('languageId')
+                    ->withFieldSourcePath('locale')
+                    ->withSourceData($data)
                     ->build(AssociationRequiredMissingLog::class)
             );

@@ -129,8 +138,12 @@ abstract class SalesChannelConverter extends ShopwareConverter

         $currencyUuid = $this->currencyLookup->get($data['currency'], $context);
         if ($currencyUuid === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(SalesChannelDefinition::ENTITY_NAME)
+                    ->withFieldName('currencyId')
+                    ->withFieldSourcePath('currency')
+                    ->withSourceData($data)
                     ->build(AssociationRequiredMissingLog::class)
             );

@@ -152,8 +165,12 @@ abstract class SalesChannelConverter extends ShopwareConverter
         );

         if ($categoryMapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(SalesChannelDefinition::ENTITY_NAME)
+                    ->withFieldName('navigationCategoryId')
+                    ->withFieldSourcePath('category_id')
+                    ->withSourceData($data)
                     ->build(AssociationRequiredMissingLog::class)
             );

@@ -372,8 +389,10 @@ abstract class SalesChannelConverter extends ShopwareConverter
                     $converted['languageId'] = Defaults::LANGUAGE_SYSTEM;
                 }

-                $this->loggingService->addLogEntry( // TODO: add optional fields
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($this->migrationContext)
+                        ->withEntityName(SalesChannelDefinition::ENTITY_NAME)
+                        ->withFieldName('languageId')
                         ->build(DeactivatedPackLanguageLog::class)
                 );
             }
diff --git c/src/Profile/Shopware/Converter/SeoUrlConverter.php i/src/Profile/Shopware/Converter/SeoUrlConverter.php
index 565a5c66..88c887ec 100644
--- c/src/Profile/Shopware/Converter/SeoUrlConverter.php
+++ i/src/Profile/Shopware/Converter/SeoUrlConverter.php
@@ -7,6 +7,7 @@

 namespace SwagMigrationAssistant\Profile\Shopware\Converter;

+use Shopware\Core\Content\Seo\SeoUrl\SeoUrlDefinition;
 use Shopware\Core\Framework\Context;
 use Shopware\Core\Framework\Log\Package;
 use SwagMigrationAssistant\Migration\Converter\ConvertStruct;
@@ -65,8 +66,13 @@ abstract class SeoUrlConverter extends ShopwareConverter
         );

         if ($mapping === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(SeoUrlDefinition::ENTITY_NAME)
+                    ->withFieldName('salesChannelId')
+                    ->withFieldSourcePath('subshopID')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(AssociationRequiredMissingLog::class)
             );

@@ -78,8 +84,13 @@ abstract class SeoUrlConverter extends ShopwareConverter

         $converted['languageId'] = $this->languageLookup->get($data['_locale'], $context);
         if ($converted['languageId'] === null) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(SeoUrlDefinition::ENTITY_NAME)
+                    ->withFieldName('languageId')
+                    ->withFieldSourcePath('_locale')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(AssociationRequiredMissingLog::class)
             );

@@ -105,8 +116,12 @@ abstract class SeoUrlConverter extends ShopwareConverter
                 );

                 if ($mapping === null) {
-                    $this->loggingService->addLogEntry( // TODO: add optional fields
+                    $this->loggingService->addLogEntry(
                         SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                            ->withEntityName(SeoUrlDefinition::ENTITY_NAME)
+                            ->withFieldName('foreignKey')
+                            ->withFieldSourcePath('type')
+                            ->withSourceData($data)
                             ->build(AssociationRequiredMissingLog::class)
                     );

@@ -127,8 +142,12 @@ abstract class SeoUrlConverter extends ShopwareConverter
             );

             if ($mapping === null) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                        ->withEntityName(SeoUrlDefinition::ENTITY_NAME)
+                        ->withFieldName('foreignKey')
+                        ->withFieldSourcePath('type')
+                        ->withSourceData($data)
                         ->build(AssociationRequiredMissingLog::class)
                 );

@@ -139,8 +158,12 @@ abstract class SeoUrlConverter extends ShopwareConverter
             $converted['pathInfo'] = '/navigation/' . $mapping['entityUuid'];
             $this->mappingIds[] = $mapping['id'];
         } else {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(SeoUrlDefinition::ENTITY_NAME)
+                    ->withFieldName('foreignKey')
+                    ->withFieldSourcePath('type')
+                    ->withSourceData($data)
                     ->build(UnsupportedSeoUrlTypeLog::class)
             );

diff --git c/src/Profile/Shopware/Converter/ShippingMethodConverter.php i/src/Profile/Shopware/Converter/ShippingMethodConverter.php
index 0c71b8c6..3c0ed66d 100644
--- c/src/Profile/Shopware/Converter/ShippingMethodConverter.php
+++ i/src/Profile/Shopware/Converter/ShippingMethodConverter.php
@@ -7,6 +7,8 @@

 namespace SwagMigrationAssistant\Profile\Shopware\Converter;

+use Shopware\Core\Checkout\Shipping\Aggregate\ShippingMethodPrice\ShippingMethodPriceDefinition;
+use Shopware\Core\Checkout\Shipping\ShippingMethodDefinition;
 use Shopware\Core\Framework\Context;
 use Shopware\Core\Framework\Log\Package;
 use Shopware\Core\Framework\Rule\Container\AndRule;
@@ -93,8 +95,12 @@ abstract class ShippingMethodConverter extends ShopwareConverter
         $this->connectionId = $connection->getId();

         if (empty($data['id'])) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(ShippingMethodDefinition::ENTITY_NAME)
+                    ->withFieldName('id')
+                    ->withFieldSourcePath('id')
+                    ->withSourceData($data)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

@@ -143,12 +149,14 @@ abstract class ShippingMethodConverter extends ShopwareConverter

         $fields = $this->checkForEmptyRequiredConvertedFields($converted, $this->requiredDataFields);
         if (!empty($fields)) {
-            foreach ($fields as $field) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
-                    SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
-                        ->build(EmptyNecessaryFieldRunLog::class)
-                );
-            }
+            $this->loggingService->addLogForEach(
+                $fields,
+                fn (string $key) => SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withFieldName(ShippingMethodDefinition::ENTITY_NAME)
+                    ->withFieldSourcePath($key)
+                    ->withSourceData($data)
+                    ->build(EmptyNecessaryFieldRunLog::class)
+            );

             return new ConvertStruct(null, $data);
         }
@@ -178,8 +186,13 @@ abstract class ShippingMethodConverter extends ShopwareConverter
             if (!isset($data['calculation'])
                 || !\array_key_exists($data['calculation'], self::CALCULATION_TYPE_MAPPING)
             ) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                        ->withEntityName(ShippingMethodDefinition::ENTITY_NAME)
+                        ->withFieldName('prices')
+                        ->withFieldSourcePath('calculation')
+                        ->withSourceData($data)
+                        ->withConvertedData($converted)
                         ->build(UnsupportedShippingCalculationTypeLog::class)
                 );
             } else {
@@ -233,8 +246,12 @@ abstract class ShippingMethodConverter extends ShopwareConverter
         $this->updateMainMapping($migrationContext, $context);

         if (!\is_array($this->mainMapping) || !\array_key_exists('id', $this->mainMapping)) {
-            $this->loggingService->addLogEntry( // TODO: add optional fields
+            $this->loggingService->addLogEntry(
                 SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                    ->withEntityName(ShippingMethodDefinition::ENTITY_NAME)
+                    ->withFieldName('id')
+                    ->withSourceData($data)
+                    ->withConvertedData($converted)
                     ->build(EmptyNecessaryFieldRunLog::class)
             );

@@ -634,8 +651,12 @@ abstract class ShippingMethodConverter extends ShopwareConverter
         $convertedCosts = [];
         foreach ($shippingCosts as $key => $shippingCost) {
             if (empty($shippingCost['id'])) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                        ->withEntityName(ShippingMethodPriceDefinition::ENTITY_NAME)
+                        ->withFieldName('id')
+                        ->withFieldSourcePath('id')
+                        ->withSourceData($data)
                         ->build(EmptyNecessaryFieldRunLog::class)
                 );

@@ -667,8 +688,12 @@ abstract class ShippingMethodConverter extends ShopwareConverter
             }

             if (!isset($currencyMapping)) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                        ->withEntityName(ShippingMethodPriceDefinition::ENTITY_NAME)
+                        ->withFieldName('currencyId')
+                        ->withFieldSourcePath('currencyShortName')
+                        ->withSourceData($data)
                         ->build(EmptyNecessaryFieldRunLog::class)
                 );

@@ -682,8 +707,12 @@ abstract class ShippingMethodConverter extends ShopwareConverter
             }

             if (isset($shippingCost['factor']) && $shippingCost['factor'] > 0) {
-                $this->loggingService->addLogEntry( // TODO: add optional fields
+                $this->loggingService->addLogEntry(
                     SwagMigrationLogBuilder::fromMigrationContext($migrationContext)
+                        ->withEntityName(ShippingMethodPriceDefinition::ENTITY_NAME)
+                        ->withFieldSourcePath('factor')
+                        ->withSourceData($shippingCost)
+                        ->withConvertedData($cost)
                         ->build(UnsupportedShippingPriceLog::class)
                 );

diff --git c/src/Profile/Shopware/Converter/TranslationConverter.php i/src/Profile/Shopware/Converter/TranslationConverter.php
index abe5d81e..7a9da3d1 100644
--- c/src/Profile/Shopware/Converter/Translatio…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants