添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Logs

This is archived documentation for InfluxData product versions that are no longer maintained. For newer documentation, see the latest InfluxData documentation .

InfluxDB writes log output, by default, to stderr . Depending on your use case, this log information can be written to another location.

Running InfluxDB directly

If you run InfluxDB directly, using influxd , all logs will be written to stderr . You may redirect this log output as you would any output to stderr like so:

influxd 2>$HOME/my_log_file

Launched as a service

sysvinit

If InfluxDB was installed using a pre-built package, and then launched as a service, stderr is redirected to /var/log/influxdb/influxd.log , and all log data will be written to that file. You can override this location by setting the variable STDERR in the file /etc/default/influxdb .

Note: On macOS the logs, by default, are stored in the file /usr/local/var/log/influxdb.log

For example, if /etc/default/influxdb contains:

STDERR=/dev/null

all log data will be discarded. You can similarly direct output to stdout by setting STDOUT in the same file. Output to stdout is sent to /dev/null by default when InfluxDB is launched as a service.

InfluxDB must be restarted to pick up any changes to /etc/default/influxdb .

systemd

Starting with version 1.0, InfluxDB on systemd systems will no longer write files to /var/log/influxdb by default, and will now use the system configured default for logging (usually journald). On most