# Serilog error

**URL:** <https://discuss.elastic.co/t/serilog-error/363932>\
**Category:** Elastic Observability\
**Created:** [July 28, 2024, 11:27pm UTC](https://discuss.elastic.co/t/serilog-error/363932 "2024-07-28T23:27:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paolo\_ponzano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paolo_ponzano/32/136349_2.png) [@paolo\_ponzano](https://discuss.elastic.co/u/paolo_ponzano)\
**Post date:** [July 28, 2024, 11:27pm UTC](https://discuss.elastic.co/t/serilog-error/363932/1 "2024-07-28T23:27:13Z")

</div>

I'm trying to use official ECS Serilog Sink on a newly cloud instance of Elastic Search.

Here's the payload I'm using

I'm trying to use Elasticsearch in place of [Logz.Io](http://Logz.Io).. I've my Elasticsearch instance running on Azure and I'm trying to run this integration test.

```auto
[Fact]
public void WriteLog_WritesMessageToSerilog()
{
    // Arrange

    var nodes = new[] { new Uri("url") };
    
    var message = "Test message";
    // We'll use a StringWriter to capture the output of the logger
    
    var logger = new LoggerConfiguration()
        .MinimumLevel.Debug()
        .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
        .Enrich.FromLogContext()

        .WriteTo.Elasticsearch(nodes, opts =>
        {
            
            opts.AutoRegisterTemplateVersion = AutoRegisterTemplateVersion.ESv7;
            
            opts.ChannelDiagnosticsCallback = diagnosticCallBack;
            opts.BootstrapMethod = BootstrapMethod.Failure;
            opts.DataStream = new DataStreamName("logs", "console-example") ; 
            opts.ConfigureChannel = channelOpts =>
            {
                channelOpts.BufferOptions = new BufferOptions { ExportMaxConcurrency = 10 };
            };
        }, transport =>
        {
            
        })

        .CreateLogger();
    // Act
    logger.Information(message);
    // Assert
     
}

```

When I run it I got the following error in the callback:

```auto
Failed publish over channel: EcsDataStreamChannel`1.
Exported Buffers: 0
Exported Items: 0
Export Responses: 0
Export Retries: 0
Export Exhausts: 0
Export Returned Items to retry: False
Inbound Buffer Read Loop Started: False
Inbound Buffer Publishes: 0
Inbound Buffer Publish Failures: 0
Outbound Buffer Read Loop Started: False
Outbound Buffer Read Loop Exited: False
Outbound Buffer Publishes: 0
Outbound Buffer Publish Failures: 0
Exception: None

```

I'm using the official Elasticsearch search Serilog nuget Elastic.Serilog.Sinks 8.11.1

Any suggestion to start looking at this error?

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [July 29, 2024, 8:48pm UTC](https://discuss.elastic.co/t/serilog-error/363932/2 "2024-07-29T20:48:14Z")

</div>

From #Kibana to #Elastic Observability
