# Unable to create logrotated files in filebeat

**URL:** <https://discuss.elastic.co/t/unable-to-create-logrotated-files-in-filebeat/135136>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 8, 2018, 11:05am UTC](https://discuss.elastic.co/t/unable-to-create-logrotated-files-in-filebeat/135136 "2018-06-08T11:05:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahara](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@sahara](https://discuss.elastic.co/u/sahara)\
**Post date:** [June 8, 2018, 11:05am UTC](https://discuss.elastic.co/t/unable-to-create-logrotated-files-in-filebeat/135136/1 "2018-06-08T11:05:06Z")

</div>

```auto
config file:
    filebeat.prospectors:
    - type: log
      enabled: true
      paths:
        - /var/log/pcapcapture/packets.json
      document_type: "pcap_file"
      json.keys_under_root: true 
      fields: {log_type: capture}

    logging.level: info
    logging.metrics.enabled: true
    logging.to_files: true
    logging.files:
     path: /var/log/filebeat
     name: filebeat.log
     rotateeverybytes: 10485760 # = 10MB
     keepfiles: 7

```

i dont see any file created in /var/log/filebeat can anybody help me what i am missing  
Thanks

---

<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:** [June 8, 2018, 1:37pm UTC](https://discuss.elastic.co/t/unable-to-create-logrotated-files-in-filebeat/135136/2 "2018-06-08T13:37:37Z")

</div>

How are you starting Filebeat? If you set `-e` (log to stderr) then it will not write a file.

Writing to `/var/log/filebeat/filebeat` is the default behavior. So if you don't set any `logging.*` options or set any CLI flags (like `-e`) then that's what it will do.

---

<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, 2018, 1:50pm UTC](https://discuss.elastic.co/t/unable-to-create-logrotated-files-in-filebeat/135136/3 "2018-07-06T13:50:32Z")

</div>

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