You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/06/23 00:07:55 UTC

[GitHub] [trafficcontrol] rawlinp commented on a diff in pull request #6919: Log errors in Traffic Stats when closing influxdb client

rawlinp commented on code in PR #6919:
URL: https://github.com/apache/trafficcontrol/pull/6919#discussion_r904409282


##########
traffic_stats/traffic_stats.go:
##########
@@ -555,7 +555,9 @@ func loadStartupConfig(configFile string, oldConfig StartupConfig) (StartupConfi
 	//Close old connections explicitly
 	for _, host := range oldConfig.InfluxDBs {
 		if host.InfluxClient != nil {
-			host.InfluxClient.Close()
+			if err := host.InfluxClient.Close(); err != nil {
+				errorf("closing influx client: %s", err)

Review Comment:
   Unfortunately, no, because Traffic Stats is currently straddling two different logging libraries (lib/go-log and seelog), hence why we have to use an `errorf` helper func here. Once we get rid of seelog support, we can change these to `log.Close(...)`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org