# Elasticsearch log to windows event log

**URL:** <https://discuss.elastic.co/t/elasticsearch-log-to-windows-event-log/16070>\
**Category:** Elasticsearch\
**Created:** [February 28, 2014, 11:43am UTC](https://discuss.elastic.co/t/elasticsearch-log-to-windows-event-log/16070 "2014-02-28T11:43:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenneth\_Olsen](https://avatars.discourse-cdn.com/v4/letter/k/3e96dc/32.png) [@Kenneth\_Olsen](https://discuss.elastic.co/u/Kenneth_Olsen)\
**Post date:** [February 28, 2014, 11:43am UTC](https://discuss.elastic.co/t/elasticsearch-log-to-windows-event-log/16070/1 "2014-02-28T11:43:35Z")

</div>

Hi

Does anyone have an example of logging YAML that uses the event log on  
Windows? I've tried:

[http://wiki.apache.org/logging-log4j/NTEventLogAppender](http://wiki.apache.org/logging-log4j/NTEventLogAppender)  
[http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/nt/NTEventLogAppender.html](http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/nt/NTEventLogAppender.html)

But I cannot get it to work.

Regards,

Ken

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c18e5bf8-c3b3-448a-ba5e-c5c421679cac%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c18e5bf8-c3b3-448a-ba5e-c5c421679cac%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Binh\_Ly\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Binh\_Ly\_2](https://discuss.elastic.co/u/Binh_Ly_2)\
**Post date:** [February 28, 2014, 2:35pm UTC](https://discuss.elastic.co/t/elasticsearch-log-to-windows-event-log/16070/2 "2014-02-28T14:35:02Z")

</div>

I just tried on Windows 7 (I'm logged in as admin and I run ES as admin -  
if that matters).

1. First thing I did was download and copy the NTEventLogAppender.amd64.dll  
into my System32

2. Then I did the Regedit instructions here:  
[http://wiki.apache.org/logging-log4j/NTEventLogAppender](http://wiki.apache.org/logging-log4j/NTEventLogAppender) (Although I don't  
know if this step was necessary)

3. I added these to the logging.yml file (see in bold)

# you can override this using by setting a system property, for example

-Des.logger.level=DEBUG  
es.logger.level: INFO  
rootLogger: ${es.logger.level}, console, file\*, nt\*  
...

- nt: type: org.apache.log4j.nt.NTEventLogAppender source: ES  
layout: type: pattern conversionPattern:  
"[%d{ISO8601}][%-5p][%-25c] %m%n"\*  
After that, I restarted ES and I saw the logs come in under Windows  
Logs\Application in the event log.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/055bd972-a56b-4514-abce-96d6979ccd03%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/055bd972-a56b-4514-abce-96d6979ccd03%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Kenneth\_Olsen](https://avatars.discourse-cdn.com/v4/letter/k/3e96dc/32.png) [@Kenneth\_Olsen](https://discuss.elastic.co/u/Kenneth_Olsen)\
**Post date:** [February 28, 2014, 9:47pm UTC](https://discuss.elastic.co/t/elasticsearch-log-to-windows-event-log/16070/3 "2014-02-28T21:47:18Z")

</div>

> Great thanks.

Ken

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ca0e5224-1a39-4cf3-a60c-6d8273529f55%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ca0e5224-1a39-4cf3-a60c-6d8273529f55%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 1:46am UTC](https://discuss.elastic.co/t/elasticsearch-log-to-windows-event-log/16070/4 "2017-07-06T01:46:27Z")

</div>


