fix(pkg/logfile): add compression

This commit is contained in:
Markus Pesch 2019-06-21 15:43:15 +02:00
parent f979e88a52
commit 3791723230
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
2 changed files with 4 additions and 2 deletions

View File

@ -23,6 +23,10 @@ var convertTemperatureCmd = &cobra.Command{
log.Fatalln(err)
}
if compression {
temperatures = logfile.CompressTemperature(temperatures)
}
temperatureLogfileOutput := logfile.New(args[1])
err = temperatureLogfileOutput.WriteTemperatures(temperatures)
if err != nil {

View File

@ -66,8 +66,6 @@ func Start(cnf *config.Configuration, cleanCacheInterval time.Duration, compress
logger.Error("Can not turn on blue info light: %v", err)
}
//temperaturesLogfile,_ := temperatureLogfile.ReadTemperatures()
err = logfile.AppendTemperatures(temperatureLogfile, compression, temperatureCache)
if err != nil {