Silence influx logger
This commit is contained in:
parent
37f9a77f83
commit
9d936cb8ec
1 changed files with 4 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/andig/evcc/core"
|
||||
"github.com/andig/evcc/util"
|
||||
influxdb2 "github.com/influxdata/influxdb-client-go/v2"
|
||||
influxlog "github.com/influxdata/influxdb-client-go/v2/log"
|
||||
)
|
||||
|
||||
// InfluxConfig is the influx db configuration
|
||||
|
|
@ -42,6 +43,9 @@ func NewInfluxClient(url, token, org, user, password, database string) *Influx {
|
|||
options := influxdb2.DefaultOptions().SetPrecision(time.Second)
|
||||
client := influxdb2.NewClientWithOptions(url, token, options)
|
||||
|
||||
// handle error logging in writer
|
||||
influxlog.Log = nil
|
||||
|
||||
return &Influx{
|
||||
log: log,
|
||||
client: client,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue