Skip to content

Commit a267205

Browse files
thulasirajkomminarbednar
authored andcommitted
feat: added logging
1 parent 94c8385 commit a267205

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### Others
44

55
1. [#68](https://github.com/InfluxCommunity/influxdb3-go/pull/68): Upgrade Go version to 1.22.
6+
2. [#74](https://github.com/InfluxCommunity/influxdb3-go/pull/74): Added logger.
67

78
## 0.6.0 [2024-03-01]
89

influxdb3/config.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ package influxdb3
2525
import (
2626
"errors"
2727
"fmt"
28-
"github.com/influxdata/line-protocol/v2/lineprotocol"
2928
"net/http"
3029
"net/url"
3130
"os"
3231
"strconv"
32+
33+
"github.com/influxdata/line-protocol/v2/lineprotocol"
3334
)
3435

3536
const (

influxdb3/point_values.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ package influxdb3
2424

2525
import (
2626
"fmt"
27+
"log/slog"
2728
"time"
2829
)
2930

@@ -70,7 +71,7 @@ func (pv *PointValues) SetTimestamp(timestamp time.Time) *PointValues {
7071
// SetTag sets a tag value and returns the modified PointValues
7172
func (pv *PointValues) SetTag(name string, value string) *PointValues {
7273
if value == "" {
73-
fmt.Printf("Empty tags has no effect, tag [%s], measurement [%s]\n", name, pv.MeasurementName)
74+
slog.Debug(fmt.Sprintf("Empty tags has no effect, tag [%s], measurement [%s]", name, pv.MeasurementName))
7475
} else {
7576
pv.Tags[name] = value
7677
}

0 commit comments

Comments
 (0)