# \[filebeat\] not generating logs when logging set to debug

**URL:** <https://discuss.elastic.co/t/filebeat-not-generating-logs-when-logging-set-to-debug/195389>\
**Category:** Beats\
**Created:** [August 15, 2019, 8:09pm UTC](https://discuss.elastic.co/t/filebeat-not-generating-logs-when-logging-set-to-debug/195389 "2019-08-15T20:09:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtudisco](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mtudisco](https://discuss.elastic.co/u/mtudisco)\
**Post date:** [August 15, 2019, 8:09pm UTC](https://discuss.elastic.co/t/filebeat-not-generating-logs-when-logging-set-to-debug/195389/1 "2019-08-15T20:09:51Z")

</div>

Hi,  
i have configured logging in filebeat.yml

```
#================================ Logging =====================================

# Sets log level. The default log level is info.
# Available log levels are: error, warning, info, debug
logging.level: debug

# At debug level, you can selectively enable logging only for some components.
# To enable all selectors use ["*"]. Examples of other selectors are "beat",
# "publish", "service".
#logging.selectors: ["*"]

# Logging to rotating files. Set logging.to_files to false to disable logging to
# files.
logging.to_files: true
logging.files:
  # Configure the path where the logs are written. The default is the logs directory
  # under the home path (the binary location).
  path: /var/log/filebeat

  # The name of the files where the logs are written to.
  name: filebeat

  # Configure log file size limit. If limit is reached, log file will be
  # automatically rotated
  rotateeverybytes: 10485760 # = 10MB

  # Number of rotated log files to keep. Oldest files will be deleted first.
  keepfiles: 7

  # The permissions mask to apply when rotating log files. The default value is 0600.
  # Must be a valid Unix-style file permissions mask expressed in octal notation.
  permissions: 0600

```

however when i start filebeat with

`systemctl start filebeat`

i seet filebeat is started with -e option and no log is generated.

I found no way to enable to make it generate logs other than staring it manually without the -e option.

I also tried to modify the /etc/init.d/filebeat to remove the -e option but it starts with -e option.

Does anyone faced to it? should i modify something else?

thanks

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [August 16, 2019, 11:51am UTC](https://discuss.elastic.co/t/filebeat-not-generating-logs-when-logging-set-to-debug/195389/2 "2019-08-16T11:51:51Z")

</div>

systemctl is the systemd tool. The init file you have modified is only a fallback when systemd is not used.  
The systemd configuration should be in /etc/systemd/system/filebeat.service I think.

---

<div class="post-metadata">

**Author:** ![mtudisco](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mtudisco](https://discuss.elastic.co/u/mtudisco)\
**Post date:** [August 16, 2019, 12:21pm UTC](https://discuss.elastic.co/t/filebeat-not-generating-logs-when-logging-set-to-debug/195389/3 "2019-08-16T12:21:17Z")

</div>

Thanks steffens, but theres is no file in /etc/systemd/system called filebeat.service  
i have logstash.service and other ones but no filebeat, dont know where it should be getting the startup script.

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [August 18, 2019, 11:38pm UTC](https://discuss.elastic.co/t/filebeat-not-generating-logs-when-logging-set-to-debug/195389/4 "2019-08-18T23:38:43Z")

</div>

How did you install filebeat?

Can you check if `/lib/systemd/system/filebeat.service` exists?

---

<div class="post-metadata">

**Author:** ![mtudisco](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mtudisco](https://discuss.elastic.co/u/mtudisco)\
**Post date:** [August 19, 2019, 12:36pm UTC](https://discuss.elastic.co/t/filebeat-not-generating-logs-when-logging-set-to-debug/195389/5 "2019-08-19T12:36:58Z")

</div>

Thanks Steffens!, i found file `/lib/systemd/system/filebeat.service` and had a line  
`Environment="BEAT_LOG_OPTS=-e"`  
i commented the line and when i restarted the service it did not start with -e option.

---

<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:** [September 16, 2019, 2:37pm UTC](https://discuss.elastic.co/t/filebeat-not-generating-logs-when-logging-set-to-debug/195389/6 "2019-09-16T14:37:02Z")

</div>

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