Skip to content

Commit

Permalink
Fix function name of IndexOperationParams to AddParameter (#67)
Browse files Browse the repository at this point in the history
* Fix function name of IndexOperationParams
   In order to accept <Parameter> it should be named AddParameter()

* Fixed Tests

* May be related to issu #66 

Co-authored-by: Eran Gil <[email protected]>
  • Loading branch information
urielha and eran-gil authored Jun 27, 2021
1 parent 2212b1c commit 33934c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/log4stash.IntegrationTests/ElasticSearchAppenderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void Log_With_Custom_Id()
oldDocId = null;
}

appender.IndexOperationParams.AddOrSetParameter(new IndexOperationParam(idKey, "%{" + idSource + "}"));
appender.IndexOperationParams.AddParameter(new IndexOperationParam(idKey, "%{" + idSource + "}"));
});
ThreadContext.Properties[idSource] = idValue;
_log.Info("loggingtest");
Expand All @@ -65,7 +65,7 @@ public void Log_With_Custom_Id()
}
else
{
appender.IndexOperationParams.AddOrSetParameter(new IndexOperationParam(idKey, oldDocId));
appender.IndexOperationParams.AddParameter(new IndexOperationParam(idKey, oldDocId));
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public IndexOperationParamsDictionary()
_parametersDictionary = new Dictionary<string, LogEventSmartFormatter>();
}

public void AddOrSetParameter(IndexOperationParam parameter)
public void AddParameter(IndexOperationParam parameter)
{
_parametersDictionary[parameter.Key] = parameter.Value;
}
Expand Down

0 comments on commit 33934c4

Please sign in to comment.