# Cannot view logs in Observability log app

**URL:** <https://discuss.elastic.co/t/cannot-view-logs-in-observability-log-app/274257>\
**Category:** Logs\
**Tags:** dotnet\
**Created:** [May 27, 2021, 7:36pm UTC](https://discuss.elastic.co/t/cannot-view-logs-in-observability-log-app/274257 "2021-05-27T19:36:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![NoviceESCoder](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@NoviceESCoder](https://discuss.elastic.co/u/NoviceESCoder)\
**Post date:** [May 27, 2021, 7:36pm UTC](https://discuss.elastic.co/t/cannot-view-logs-in-observability-log-app/274257/1 "2021-05-27T19:36:10Z")

</div>

I have a [asp.net](http://asp.net) core web app (mvc) project that will write the logs using Serilog to Elasticsearch. I created the index pattern in Kibana and I can view the logs that was written to elasticsearch under Discover. But when I go to Observability -\> Logs it shows **there are no log messages to display**. I go to settings, then under `Log indices` I include the index pattern for matching indices that contain log data which for me is `customer-simulation-es-app-logs*` and I hit apply. But when I go back to view the logs, nothing will display even after I run the program and write logs to elasticsearch. I can only view the logs in discover but nothing will display in Logs.

**Is there a way to fix this issue so I can view the logs that I have written to elasticsearch under logs in Observability?**

`appsettings.json`

```
{
  "ApplicationName": "customer-simulation-es-app",
  "Serilog": {
    "MinimumLevel": {
      "Default": "Information",
      "Override": {
        "Microsoft": "Information",
        "System": "Warning"
      }
    }
  },
  "ElasticConfiguration": {
    "Uri": "http://localhost:9200"
  },
  "AllowedHosts": "*"
}

```

`Program.cs`

```
public static IHostBuilder CreateHostBuilder(string[] args) =>
            Host.CreateDefaultBuilder(args)
                .UseSerilog((context, configuration) =>
                {
                    configuration.Enrich.FromLogContext()
                        .Enrich.WithMachineName()
                        .WriteTo.Console()
                        .WriteTo.Elasticsearch(new ElasticsearchSinkOptions(new Uri(context.Configuration["ElasticConfiguration:Uri"]))
                        {
                            IndexFormat = $"{context.Configuration["ApplicationName"]}-logs-{context.HostingEnvironment.EnvironmentName?.ToLower().Replace(".", "-")}-{DateTime.UtcNow:yyyy-MM}",
                            AutoRegisterTemplate = true
                        })
                        .Enrich.WithProperty("Environment", context.HostingEnvironment.EnvironmentName)
                        .ReadFrom.Configuration(context.Configuration);
                })
                .ConfigureWebHostDefaults(webBuilder =>
                {
                    webBuilder.UseStartup<Startup>();
                });

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/b/0bb069a18c653b63ebfb336bb70c1db6de83126a.png)

**This is what keeps displaying but there is logs... even if I click on stream live and perform the operations in the app, nothing will get displayed here but in Discover the logs do display. Not sure why I cannot view my logs under Observability -\> Logs.**

[![enter image description here](https://i.stack.imgur.com/Thcws.png)](https://i.stack.imgur.com/Thcws.png)

This is the logs in Discover:

[![enter image description here](https://i.stack.imgur.com/e079U.png)](https://i.stack.imgur.com/e079U.png)

---

<div class="post-metadata">

**Author:** ![Kerry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kerry/32/40330_2.png) [@Kerry](https://discuss.elastic.co/u/Kerry)\
**Post date:** [June 2, 2021, 1:46pm UTC](https://discuss.elastic.co/t/cannot-view-logs-in-observability-log-app/274257/2 "2021-06-02T13:46:42Z")

</div>

Hi @NoviceESCoder,

Sorry to see you're having problems. There isn't anything obvious wrong here, and we would have expected some errors to have surfaced before this point if certain things were wrong. So we'll try to figure out what might be happening here.

Please could you run the following command in the dev tools within Kibana and paste the output here:

`GET /customer-simulation-es-app-logs*/_mapping`

This will allow us to see the exact mappings for those indices.

Could you also check your Kibana logs to see if anything may have surfaced there.

Lastly, could you please check the network panel of your browser's developer tools to see if there are any failed requests.

---

<div class="post-metadata">

**Author:** ![NoviceESCoder](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@NoviceESCoder](https://discuss.elastic.co/u/NoviceESCoder)\
**Post date:** [June 2, 2021, 2:11pm UTC](https://discuss.elastic.co/t/cannot-view-logs-in-observability-log-app/274257/3 "2021-06-02T14:11:45Z")

</div>

Sure thing, I greatly appreciate your help.

This is what I get when I run the cmd `GET /customer-simulation-es-app-logs*/_mapping`. I attempted to copy the entire result but it is too large and does not let me post. So here are the pictures.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/1/111ae3ebba62422e979bf35bc43405f018c521f2.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d6381d026915e4209a6a19ec150664e77db89f05.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/e/2ee9ce5ffc48cf65bfe4d165a2831b0fc6533bf9.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/4/c42de252576d42b7ffe929a433127ff492c52a37.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/1/c1ab0e5fefb432ebf483fac9710c0d3ebc8d7afb.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/a/2ad376ffa6065e9a196e5b592de8e8a5b65050a1.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/c/9c776facee31ed1356fb86c6b4b1d8f64388528f.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/4/44b0a850144d78310fc903f05ae24fc4b7a5cd78.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/e/6e043dc27df876e3e5802bcee9f84ea578e529d8.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/b/2b67caec84da4124b59f34bae53442cc91542175.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/1/b18dc1c6fa4b5181656626abcd94ceb0b54932ba.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/e/deaeb44b9b90d507ebdcab5bdf811a7af9f3f203.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e51cec5277d881cc26dd1684541479604c74c1d.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/5/f5de27ffe3aaff9049016dbf027e2bb9ac5b1abb.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/0/5080166e6eebecdaf4f4ed4377756137829ab248.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/5/751407a0b1d644247d4fc9c99067e60ec4070ab3.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/b/4b9bd91004eea195aa48ad870cd9b0b2d48b7752.png)

I get these two errors when I inspect the page:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/3/030cbbcf4dde6a601550c2659a10d56384a37f1e.png)

---

<div class="post-metadata">

**Author:** ![Kerry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kerry/32/40330_2.png) [@Kerry](https://discuss.elastic.co/u/Kerry)\
**Post date:** [June 2, 2021, 3:11pm UTC](https://discuss.elastic.co/t/cannot-view-logs-in-observability-log-app/274257/4 "2021-06-02T15:11:05Z")

</div>

Hmm, mappings look good, thank you.

The errors in the console are okay (well, unrelated).

Did you see anything in your Kibana server logs at all?

Also, could you check if there's any errors in your network panel specifically (not console) in the developer tools. Please could you check this on the Log's Stream page.

Lastly, generating a HAR recording of the network panel and sharing that could be useful. This would again be taken on the Log's Stream page.

---

<div class="post-metadata">

**Author:** ![NoviceESCoder](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@NoviceESCoder](https://discuss.elastic.co/u/NoviceESCoder)\
**Post date:** [June 2, 2021, 4:18pm UTC](https://discuss.elastic.co/t/cannot-view-logs-in-observability-log-app/274257/5 "2021-06-02T16:18:03Z")

</div>

I think there was a bug going on, because I am now able to see the logs! Very strange it was not working for 3 days until just now! Not sure what caused it not to work, but its working! Thanks for your help!!

---

<div class="post-metadata">

**Author:** ![Kerry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kerry/32/40330_2.png) [@Kerry](https://discuss.elastic.co/u/Kerry)\
**Post date:** [June 3, 2021, 12:15pm UTC](https://discuss.elastic.co/t/cannot-view-logs-in-observability-log-app/274257/6 "2021-06-03T12:15:55Z")

</div>

Glad you're sorted 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 1, 2021, 12:16pm UTC](https://discuss.elastic.co/t/cannot-view-logs-in-observability-log-app/274257/7 "2021-07-01T12:16:35Z")

</div>

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