fix(pkg/logfile): add compression
This commit is contained in:
parent
f979e88a52
commit
3791723230
@ -23,6 +23,10 @@ var convertTemperatureCmd = &cobra.Command{
|
|||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if compression {
|
||||||
|
temperatures = logfile.CompressTemperature(temperatures)
|
||||||
|
}
|
||||||
|
|
||||||
temperatureLogfileOutput := logfile.New(args[1])
|
temperatureLogfileOutput := logfile.New(args[1])
|
||||||
err = temperatureLogfileOutput.WriteTemperatures(temperatures)
|
err = temperatureLogfileOutput.WriteTemperatures(temperatures)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -66,8 +66,6 @@ func Start(cnf *config.Configuration, cleanCacheInterval time.Duration, compress
|
|||||||
logger.Error("Can not turn on blue info light: %v", err)
|
logger.Error("Can not turn on blue info light: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
//temperaturesLogfile,_ := temperatureLogfile.ReadTemperatures()
|
|
||||||
|
|
||||||
err = logfile.AppendTemperatures(temperatureLogfile, compression, temperatureCache)
|
err = logfile.AppendTemperatures(temperatureLogfile, compression, temperatureCache)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user