# How to set log in kibana?

**URL:** <https://discuss.elastic.co/t/how-to-set-log-in-kibana/164120>\
**Category:** Kibana\
**Created:** [January 14, 2019, 9:50am UTC](https://discuss.elastic.co/t/how-to-set-log-in-kibana/164120 "2019-01-14T09:50:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![minhua1983](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@minhua1983](https://discuss.elastic.co/u/minhua1983)\
**Post date:** [January 14, 2019, 9:50am UTC](https://discuss.elastic.co/t/how-to-set-log-in-kibana/164120/1 "2019-01-14T09:50:05Z")

</div>

I installed kibana by default in windows 2008 r2 a few months ago.

However, I did not see log folder under the kibana installation folder.

I found that I could set config file as below in kibana.yml.

logging.dest: stdout

Atfer I set the kibana.yml and restarted the kibana service, I still did not find log folder under the kibana folder.

Is there something wrong with me?

---

<div class="post-metadata">

**Author:** ![jen-huang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jen-huang/32/74327_2.png) [@jen-huang](https://discuss.elastic.co/u/jen-huang)\
**Post date:** [January 15, 2019, 1:54am UTC](https://discuss.elastic.co/t/how-to-set-log-in-kibana/164120/2 "2019-01-15T01:54:30Z")

</div>

`logging.dest: stdout` will not create a log file. You can try a value that is a path, such as `logging.dest: /var/log/kibana.log`.

---

<div class="post-metadata">

**Author:** ![minhua1983](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@minhua1983](https://discuss.elastic.co/u/minhua1983)\
**Post date:** [January 15, 2019, 2:16am UTC](https://discuss.elastic.co/t/how-to-set-log-in-kibana/164120/3 "2019-01-15T02:16:37Z")

</div>

Thanks.

Could you tell me how to set kibana.yml to generate log files by daily?

For example:  
d:/kibana/log/kibana.log.20190112.log  
d:/kibana/log/kibana.log.20190113.log  
d:/kibana/log/kibana.log.20190114.log

---

<div class="post-metadata">

**Author:** ![jen-huang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jen-huang/32/74327_2.png) [@jen-huang](https://discuss.elastic.co/u/jen-huang)\
**Post date:** [January 15, 2019, 2:27am UTC](https://discuss.elastic.co/t/how-to-set-log-in-kibana/164120/4 "2019-01-15T02:27:18Z")

</div>

That isn't possible via kibana.yml. You could create a bash script that copies the Kibana log file every day at midnight, add the date to the new file name, and clear the original Kibana log file.

---

<div class="post-metadata">

**Author:** ![stiltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stiltz/32/39714_2.png) [@stiltz](https://discuss.elastic.co/u/stiltz)\
**Post date:** [January 15, 2019, 2:37am UTC](https://discuss.elastic.co/t/how-to-set-log-in-kibana/164120/5 "2019-01-15T02:37:39Z")

</div>

While this isn't native to the Elastic stack it is possible with a log rotate script. On Linux you would use logrotate as described here:

> [@Kibana Logs rotation](https://discuss.elastic.co/t/kibana-logs-rotation/66441):
>
> How can we enable the logs file rotation for Kibana logs in Production? I tried to create the logging.yml file in config folder, but does not seems to be working. Meenakshi

In your case on Windows I found this powershell script option on TechNet: [Browse code samples | Microsoft Learn](https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Script-to-Roll-a96ec7d4)

The powershell script doesn't meet exactly the needs you spelled out but could be modified to meet what you're looking for.

---

<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:** [February 12, 2019, 2:40am UTC](https://discuss.elastic.co/t/how-to-set-log-in-kibana/164120/6 "2019-02-12T02:40:27Z")

</div>

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