-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NLog ElasticSearch Target #369
Conversation
344e18b
to
ee17c0f
Compare
|
||
```csharp | ||
var config = new LoggingConfiguration(); | ||
var elasticTarget = new ElasticsearchTarget("elastic") { Layout = new EcsLayout(), NodesUri = "http://localhost:9200" }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifying the Layout is not necessary here correct? it defaults to this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was mostly to show that the ElasticsearchTarget
relies on the EcsLayout
, and you can configure the EcsLayout
if you want to override the default output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in principle, what a great addition to datashippers!
Could you address the conflict on the sln
file?
Yes was just missing a "Flush"-method on the shipper, as both NLog and log4net has the ability to "Flush" its targets/appenders. Flush-with-timeout gives a better shutdown experience, as dispose has no timeout, and will lead to mesage-loss when closing/disposing while burning down the house (timeout limited to 1-2 secs).
Conflicts has been resolved |
run docs-build |
@Mpdreamz Hope I nailed the integration-test this time. Sorry about the retries. |
run docs-build |
Don't be! I'll gladly retry until we get there, looking forward to releasing this! |
And one more retry, please :) |
run docs-build |
Finally green build :) |
run docs-build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@snakefoot thanks for this new package! I will be out starting today for 10 days but will release this as soon as I am back, after looking at the other open PR. |
NLog Target that exports directly to Elastic Cloud or individual Elasticsearch nodes
Docs Preview: https://github.com/snakefoot/ecs-dotnet/tree/main/src/Elastic.NLog.Targets