public void Remove(TEntity entity) { var callerInfo = LoggingExtensions.Caller(); _profiler.Profile( () => _writerDelegate.Remove(entity), $"{callerInfo} - entity=[{JsonLogging.Serialize(entity)}];" ); }
public void AddRange(IEnumerable <TEntity> entities) { var callerInfo = LoggingExtensions.Caller(); _profiler.Profile( () => _writerDelegate.AddRange(entities), $"{callerInfo} - entities=[{JsonLogging.Serialize(entities)}];" ); }
public void Undo() { _log.Error( $"function=[{MethodBase.GetCurrentMethod().Name}]; error=[\"Failed to Create Message\"]; message=[{JsonLogging.Serialize(_entity)}]"); }
public void Retry() { _log.Warn( $"function=[{MethodBase.GetCurrentMethod().Name}]; warn=[\"Retrying\"]; message=[{JsonLogging.Serialize(_entity)}];"); Execute(); }
public void Execute() { try { _log.Info($"function=[{MethodBase.GetCurrentMethod().Name}]; type=[\"OffSite\"]"); MockSync.Sync(); } catch (TimeoutException ex) { _log.Error( $"function=[{MethodBase.GetCurrentMethod().Name}]; exception=[{ex.GetBaseException().Message}]; message=[{JsonLogging.Serialize(_entity)}];"); Retry(); } catch (Exception ex) { _log.Error( $"function=[{MethodBase.GetCurrentMethod().Name}]; exception=[{ex.GetBaseException().Message}]; message=[{JsonLogging.Serialize(_entity)}];"); Undo(); } }
private string DataEventInformation(DataEvent <TEntity> dataEvent) { return($"entity=[{nameof(TEntity)}]; entity=[{JsonLogging.Serialize(dataEvent.Entity)}];"); }