serilog-sinks-elasticsearch icon indicating copy to clipboard operation
serilog-sinks-elasticsearch copied to clipboard

Logs not logged on Elasticsearch cloud from iOS xamarin

Open PrachiKarapurkar opened this issue 4 years ago • 1 comments

I have used Nuget Package: Serilog.Sinks.Elasticsearch - v8.0.1 and below is m code

 Log.Logger = new LoggerConfiguration().WriteTo.Elasticsearch(new ElasticsearchSinkOptions(new Uri(Config.LogEventsOnElesticUrl))
            {
                AutoRegisterTemplate = true,
                AutoRegisterTemplateVersion = AutoRegisterTemplateVersion.ESv7,
                ModifyConnectionSettings = x => x.BasicAuthentication(Config.ElesticCloudUsername, Config.ElesticCloudPassword)
                //CustomFormatter = new ExceptionAsObjectJsonFormatter(true)
            }).WriteTo.NSLog().CreateLogger();

and added log to capture data by Log.Information(_event + " : " + data);

But my events are not logged on Elasticsearch cloud. It works fine on android. Any setting we need to do in info.plist ? Or is there anything left to be added ?

On application output i see one message: [PLCrashReport] MSplcrash_log_writer_init:352: Could not retreive parent process name: Operation not permitted

Thanks in advance

PrachiKarapurkar avatar Feb 18 '20 11:02 PrachiKarapurkar

You run this from an iOs application? I m not sure what the issue can be. In the end it performs a normal http call, so is your configuration correct? Like the correct credentials?

mivano avatar Feb 25 '20 09:02 mivano