The logging section of the metricbeat.yml config file contains options
for configuring the logging output. The logging system can write logs to
the syslog or rotate log files. If logging is not explicitly configured the file
output is used.

Minimum log level. One of debug, info, warning, or error. The default
log level is info.

debug

Logs debug messages, including a detailed printout of all events
flushed. Also logs informational messages, warnings, errors, and
critical errors. When the log level is debug, you can specify a list of
selectors to display debug messages for specific components. If
no selectors are specified, the * selector is used to display debug messages
for all components.

info

Logs informational messages, including the number of events that are
published. Also logs any warnings, errors, or critical errors.

The list of debugging-only selector tags used by different Metricbeat components.
Use * to enable debug output for all components. For example add publish to display
all the debug messages related to event publishing. When starting metricbeat,
selectors can be overwritten using the -d command line option (-d also sets
the debug log level).

If enabled, Metricbeat periodically logs its internal metrics that have
changed in the last period. For each metric that changed, the delta from the
value at the beginning of the period is logged. Also, the total values for all
non-zero internal metrics are logged on shutdown. The default is true.

The permissions mask to apply when rotating log files. The default value is
0600. The permissions option must be a valid Unix-style file permissions mask
expressed in octal notation. In Go, numbers in octal notation must start with
0.

Examples:

0644: give read and write access to the file owner, and read access to all others.

0600: give read and write access to the file owner, and no access to all others.

0664: give read and write access to the file owner and members of the group
associated with the file, as well as read access to all other users.