I'm using Serilog in an Azure Worker Role & a WebApi with the ElasticSearch sink.
Everything works fine on the Worker Role.
On the WebApi I tried the Trace & Email sinks and they work fine. ElasticSearch sink is not logging at all.
Here is my configuration:
var logger = new LoggerConfiguration()
.MinimumLevel.Information()
.WriteTo.Trace()
.WriteTo.Elasticsearch(new ElasticsearchSinkOptions(new Uri("https://myElasticServer")))
.CreateLogger();
If I try to write Logs in a controller, I have them in the Trace but nothing in Trace.