Skip to content

Commit

Permalink
Log to systemd journal
Browse files Browse the repository at this point in the history
Let's align to InfluxDB 1.0 logging policy and log to systemd journal by
default.

closes #1732
  • Loading branch information
Ririsoft authored and sparrc committed Oct 6, 2016
1 parent 8dc42ad commit 5913f7c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/telegraf.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ After=network.target
[Service]
EnvironmentFile=-/etc/default/telegraf
User=telegraf
Environment='STDOUT=/var/log/telegraf/telegraf.log'
Environment='STDERR=/var/log/telegraf/telegraf.log'
ExecStart=/bin/sh -c "exec /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d ${TELEGRAF_OPTS} >>${STDOUT} 2>>${STDERR}"
ExecStart=/usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d ${TELEGRAF_OPTS}
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
KillMode=control-group
Expand Down

2 comments on commit 5913f7c

@xoroz
Copy link

@xoroz xoroz commented on 5913f7c Feb 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please allow it to log to a separate file. as per #872

@danielnelson
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xoroz There is an option in the agent section of the config file called logfile, does this work for you?

Please sign in to comment.