# Run filebeat with output log

**URL:** <https://discuss.elastic.co/t/run-filebeat-with-output-log/41428>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [February 10, 2016, 7:50pm UTC](https://discuss.elastic.co/t/run-filebeat-with-output-log/41428 "2016-02-10T19:50:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pablo\_perez](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@Pablo\_perez](https://discuss.elastic.co/u/Pablo_perez)\
**Post date:** [February 10, 2016, 7:50pm UTC](https://discuss.elastic.co/t/run-filebeat-with-output-log/41428/1 "2016-02-10T19:50:30Z")

</div>

I´ve been using filebeat, and I´m trying to resolve an issue when I start it in background.  
I would like to start it to throwing log information for the startup and shutdown but I cannot find a way to make it works.  
This is how I´m running the program

```
 ./filebeat -e -c filebeat.yml &> /var/log/filebeat.log

```

But checking filebeat.log it´s empty

Any idea how to run filebeat with output log?

Rergards

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [February 10, 2016, 8:10pm UTC](https://discuss.elastic.co/t/run-filebeat-with-output-log/41428/2 "2016-02-10T20:10:47Z")

</div>

`./filebeat -e -c filebeat.yml -d "*"` will give you very verbose output.

---

<div class="post-metadata">

**Author:** ![Pablo\_perez](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@Pablo\_perez](https://discuss.elastic.co/u/Pablo_perez)\
**Post date:** [February 10, 2016, 8:12pm UTC](https://discuss.elastic.co/t/run-filebeat-with-output-log/41428/3 "2016-02-10T20:12:24Z")

</div>

I need the output in a file since the program is started by ansible so I cannot see the output on console.

Regards

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [February 10, 2016, 8:47pm UTC](https://discuss.elastic.co/t/run-filebeat-with-output-log/41428/4 "2016-02-10T20:47:03Z")

</div>

You can configure logging to a file in the filebeat.yml. See the [documentation](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-configuration-details.html#configuration-logging).

For example:

```auto
logging:
  level: info
  to_files: true
  files:
    path: /var/log/filebeat
    name: filebeat.log
    keepfiles: 7

```

---

<div class="post-metadata">

**Author:** ![Pablo\_perez](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@Pablo\_perez](https://discuss.elastic.co/u/Pablo_perez)\
**Post date:** [February 10, 2016, 9:17pm UTC](https://discuss.elastic.co/t/run-filebeat-with-output-log/41428/5 "2016-02-10T21:17:54Z")

</div>

jesus!, how I miss that part of the conf file!, I did not seen it. Thanks!

---

<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 5, 2017, 9:55pm UTC](https://discuss.elastic.co/t/run-filebeat-with-output-log/41428/6 "2017-07-05T21:55:49Z")

</div>


