Merge pull request #131 from meysamhadeli/develop

fix logging in PersistMessageDbContext
This commit is contained in:
Meysam Hadeli 2023-01-26 15:57:43 +03:30 committed by GitHub
commit 1fc5b2579d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,11 +62,9 @@ public class PersistMessageDbContext : DbContext, IPersistMessageDbContext
var databaseValues = await entry.GetDatabaseValuesAsync(cancellationToken); var databaseValues = await entry.GetDatabaseValuesAsync(cancellationToken);
_logger.LogInformation( _logger.LogInformation(
"Entry to entity with database-value: {DatabaseValues} and current-value: {CurrentValues}", "Entry to entity with database-value: {@databaseValues} and current-value: {@currentValues}",
JsonConvert.SerializeObject(databaseValues, databaseValues,
new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }), currentValues);
JsonConvert.SerializeObject(currentValues,
new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }));
// Refresh the original values with current values // Refresh the original values with current values
entry.OriginalValues.SetValues(currentValues); entry.OriginalValues.SetValues(currentValues);