send info messages to std output and warnings and errors messages to stderr for filebeat
search cancel

send info messages to std output and warnings and errors messages to stderr for filebeat

book

Article ID: 282046

calendar_today

Updated On:

Products

DX OI SaaS

Issue/Introduction

Logging setting in the filebeat.yml as following. This shows logging level is set to info and all logs will write to stderr so this means that everything will show up as an error.

# Sets log level. The default log level is info.
# logging.redirect_stderr does not print regular logs to file & is experimental

logging.level: info
logging.to_files: false
logging.to_stderr: true

Can we adjust to send info to std output and warnings, errors etc to stderr?

Resolution

Filebeat sets to standard error by default for logs output, you can set LOG_LEVEL to "error" ( small case ) in filebeat env variables to avoid info logs going for Google error.

If you want to disable the logs completely ( error or info ) from console, please set variable FILEBEAT_LOG_TO_CONSOLE to true.