# Why log are not saving in Elasticsearch using Elastic.NLog.Targets lib

**URL:** https://discuss.elastic.co/t/why-log-are-not-saving-in-elasticsearch-using-elastic-nlog-targets-lib/370260
**Category:** Kibana
**Created:** [November 9, 2024, 5:49pm UTC](https://discuss.elastic.co/t/why-log-are-not-saving-in-elasticsearch-using-elastic-nlog-targets-lib/370260 "2024-11-09T17:49:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Habib\_Khan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/habib_khan/32/138000_2.png) [@Habib\_Khan](https://discuss.elastic.co/u/Habib_Khan)
#### Post date: [November 9, 2024, 5:49pm UTC](https://discuss.elastic.co/t/why-log-are-not-saving-in-elasticsearch-using-elastic-nlog-targets-lib/370260/1 "2024-11-09T17:49:26Z")

</div>

[image|690x341](https://discuss.elastic.co/uploads/short-url/31blbe3jgKB668YC1u6Ek0djPKs.png)

Hi,  
I am working in Asp net core 6 and i want to save the logs in elastics so for that i am using Elastic.NLog.Targets  
packeges ... But my logs are not getting save in elasticsearch. i run the Elasticsearch on my local machine . please if any one know about this thing like how can i save the logs in elasticsearch using this Elastic NLog Targets lib in asp net core 6 or 8. please share that code here or in comment section . we will thankful to you.
