# How to configure Elastic.Serilog.Sinks librari with appsettings.json?

**URL:** <https://discuss.elastic.co/t/how-to-configure-elastic-serilog-sinks-librari-with-appsettings-json/335635>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [June 9, 2023, 12:57pm UTC](https://discuss.elastic.co/t/how-to-configure-elastic-serilog-sinks-librari-with-appsettings-json/335635 "2023-06-09T12:57:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mchudinov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mchudinov/32/82618_2.png) [@mchudinov](https://discuss.elastic.co/u/mchudinov)\
**Post date:** [June 9, 2023, 12:57pm UTC](https://discuss.elastic.co/t/how-to-configure-elastic-serilog-sinks-librari-with-appsettings-json/335635/1 "2023-06-09T12:57:44Z")

</div>

I want to use `Elastic.Serilog.Sinks` library (created by Elastic co) to submit logs to an Elastic instance inside the Elastic cloud.

How to configure logging using `appsettings.json` for a .NET 7 application?

How to configure authentication, Elastic server endpoint etc?

There is NO configuration example in the official documentation ☹

---

<div class="post-metadata">

**Author:** ![Marcos\_Ivan\_Robles\_H](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcos_ivan_robles_h/32/121557_2.png) [@Marcos\_Ivan\_Robles\_H](https://discuss.elastic.co/u/Marcos_Ivan_Robles_H)\
**Post date:** [June 12, 2023, 11:30pm UTC](https://discuss.elastic.co/t/how-to-configure-elastic-serilog-sinks-librari-with-appsettings-json/335635/2 "2023-06-12T23:30:01Z")

</div>

Suffering the same :S

---

<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 10, 2023, 11:30pm UTC](https://discuss.elastic.co/t/how-to-configure-elastic-serilog-sinks-librari-with-appsettings-json/335635/3 "2023-07-10T23:30:04Z")

</div>

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