Sending logs to Elastic cloud using C# Logger

I am using this library to send logs to my Elastic cloud node. I am trying to include the authentication in my code but it's not working.

            var logger = new LoggerConfiguration()
            .WriteTo.Elasticsearch(new ElasticsearchSinkOptions(new Uri("https://myElasticsearchCloud:9200"))
                ModifyConnectionSettings = x => x.BasicAuthentication("username", "password"),
                IndexFormat = "testing",

i get no errors, it looks like it worked but when i search it in Kibana i don't see anything.

The Elasticsearch client works fine, but it's not convenient when i want to use the logger. Any suggestions?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.