InfluxCommunity / influxdb3-go

The go package that provides a simple and convenient way to interact with InfluxDB 3.
https://pkg.go.dev/github.com/InfluxCommunity/influxdb3-go
MIT License
24 stars 13 forks source link

`SetTag` function uses print function instead of logger #73

Closed thulasirajkomminar closed 5 months ago

thulasirajkomminar commented 6 months ago

Specifications

Code sample to reproduce problem

WriteData(context.Background(), []any{measurement})

Some measurement has empty tags and some don't. The Write method should use a logger to warn for the empty values but instead it prints the warning which we cannot control over. This will result in lot of logs.

Expected behavior

Should only print the empty tag as warning

Actual behavior

2024-04-02T18:53:19.013+02:00   Empty tags has no effect, tag [*****], measurement [*****]
2024-04-02T18:53:19.013+02:00   Empty tags has no effect, tag [*****], measurement [*****]
2024-04-02T18:53:19.013+02:00   Empty tags has no effect, tag [*****], measurement [*****]
2024-04-02T18:53:19.013+02:00   Empty tags has no effect, tag [*****], measurement [*****]
2024-04-02T18:53:19.013+02:00   Empty tags has no effect, tag [*****], measurement [*****]

Additional info

Code block https://github.com/InfluxCommunity/influxdb3-go/blob/main/influxdb3/point_values.go#L73 No response

bednar commented 6 months ago

Hi @thulasirajkomminar,

thanks for using our client.

Is this something you would be willing to help with? All PR is welcome and we will be happy to review your submission.

Best Regards

thulasirajkomminar commented 6 months ago

Hi @thulasirajkomminar,

thanks for using our client.

Is this something you would be willing to help with? All PR is welcome and we will be happy to review your submission.

Best Regards

@bednar Mirrored V2 log implementation https://github.com/InfluxCommunity/influxdb3-go/pull/74