Griesbacher / nagflux

A connector which copies performancedata from Nagios / Icinga(2) / Naemon to InfluxDB
GNU General Public License v2.0
65 stars 32 forks source link

fix logging when logfile does not yet exist #13

Closed sni closed 8 years ago

sni commented 8 years ago

The := err shadows the previous err, so the panic in line 31 doesn't work. Also testing for err == nil is the other way round, the logfile needs to be created if there is an error with Stat(). Otherwise the logging does only work if there is a logfile already.

Griesbacher commented 8 years ago

Oh OK, thank you!