Skip to content

Commit c34fec3

Browse files
committed
removed zerolog logs from examples
1 parent 52f0922 commit c34fec3

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

examples/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ require (
77
github.com/gorilla/mux v1.8.0
88
github.com/lib/pq v1.10.2
99
github.com/prometheus/client_golang v1.13.0
10-
github.com/rs/zerolog v1.27.0
1110
github.com/ydb-platform/gorm-driver v0.0.5
1211
github.com/ydb-platform/ydb-go-sdk-auth-environ v0.1.2
1312
github.com/ydb-platform/ydb-go-sdk-prometheus v0.11.10
@@ -50,6 +49,7 @@ require (
5049
github.com/prometheus/common v0.37.0 // indirect
5150
github.com/prometheus/procfs v0.8.0 // indirect
5251
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
52+
github.com/rs/zerolog v1.27.0 // indirect
5353
github.com/syndtr/goleveldb v1.0.0 // indirect
5454
github.com/yandex-cloud/go-genproto v0.0.0-20220815090733-4c139c0154e2 // indirect
5555
github.com/ydb-platform/ydb-go-genproto v0.0.0-20230528143953-42c825ace222 // indirect

examples/serverless/url_shortener/main.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"strconv"
1010
"time"
1111

12-
"github.com/rs/zerolog"
1312
environ "github.com/ydb-platform/ydb-go-sdk-auth-environ"
1413
)
1514

@@ -20,8 +19,6 @@ var (
2019
sessionPoolLimit int
2120
shutdownAfter time.Duration
2221
logLevel string
23-
24-
log = zerolog.New(os.Stdout).With().Timestamp().Logger()
2522
)
2623

2724
func init() {
@@ -73,11 +70,6 @@ func init() {
7370
flagSet.Usage()
7471
os.Exit(1)
7572
}
76-
if l, err := zerolog.ParseLevel(logLevel); err == nil {
77-
zerolog.SetGlobalLevel(l)
78-
} else {
79-
panic(err)
80-
}
8173
}
8274

8375
func main() {

examples/serverless/url_shortener/service.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"github.com/prometheus/client_golang/prometheus/promhttp"
2323
environ "github.com/ydb-platform/ydb-go-sdk-auth-environ"
2424
ydbMetrics "github.com/ydb-platform/ydb-go-sdk-prometheus"
25-
ydbZerolog "github.com/ydb-platform/ydb-go-sdk-zerolog"
2625

2726
ydb "github.com/ydb-platform/ydb-go-sdk/v3"
2827
"github.com/ydb-platform/ydb-go-sdk/v3/table"
@@ -133,10 +132,6 @@ func getService(ctx context.Context, dsn string, opts ...ydb.Option) (s *service
133132
trace.DetailsAll,
134133
),
135134
),
136-
ydbZerolog.WithTraces(
137-
&log,
138-
trace.DetailsAll,
139-
),
140135
)
141136

142137
s = &service{

0 commit comments

Comments
 (0)