File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed
Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 11module github.com/sdcio/data-server
22
3- go 1.25 .0
3+ go 1.24 .0
44
55replace github.com/openconfig/goyang v1.6.0 => github.com/sdcio/goyang v1.6.2-2
66
@@ -22,7 +22,7 @@ require (
2222 github.com/prometheus/client_golang v1.23.2
2323 github.com/scrapli/scrapligo v1.3.3
2424 github.com/sdcio/cache v0.0.38
25- github.com/sdcio/logger v0.0.1
25+ github.com/sdcio/logger v0.0.2
2626 github.com/sdcio/schema-server v0.0.33
2727 github.com/sdcio/sdc-protos v0.0.46
2828 github.com/sdcio/yang-parser v0.0.12
Original file line number Diff line number Diff line change @@ -185,8 +185,8 @@ github.com/sdcio/cache v0.0.38 h1:8meykZC/DAgzKI+R3GtZvTs0/OXWRCeNN5mxVKG0Ba8=
185185github.com/sdcio/cache v0.0.38 /go.mod h1:PHJd4pTmfFZBLdPohtXJAVBNmAKhhKdZHTi3MejGrk0 =
186186github.com/sdcio/goyang v1.6.2-2 h1:qfeUKBmoKpiKAruuEc3+V8wgHKP/n1jRDEnTy23knV8 =
187187github.com/sdcio/goyang v1.6.2-2 /go.mod h1:5WolITjek1NF8yrNERyVZ7jqjOClJTpO8p/+OwmETM4 =
188- github.com/sdcio/logger v0.0.1 h1:oJYi+6brmV+xSny+axUL+3lbgQKV40twQLi7kuUAk54 =
189- github.com/sdcio/logger v0.0.1 /go.mod h1:At0CL4k9OZY50DSzmIXMiqXJ6mEVG+JaugfymybEnG8 =
188+ github.com/sdcio/logger v0.0.2 h1:yNRGFL5ixMhpVBlU/c+hs55JRrYWjFVmYxlWl1da5PU =
189+ github.com/sdcio/logger v0.0.2 /go.mod h1:yWaOxK/G6vszjg8tKZiMqiEjlZouHsjFME4zSk+SAEA =
190190github.com/sdcio/schema-server v0.0.33 h1:RTeQMIchynAPSQaf61CZBgYHCCpsyDLEAWJn+ZKImIo =
191191github.com/sdcio/schema-server v0.0.33 /go.mod h1:q8leN1KhRNTnnqf6yxvkDk5tFl6DAsHcl81usVgYpoI =
192192github.com/sdcio/sdc-protos v0.0.46 h1:NsDdQrcPXPktLI7ZHBR6mA82AEYaFjdBYiLzJcuF55k =
Original file line number Diff line number Diff line change @@ -52,7 +52,19 @@ func main() {
5252 return
5353 }
5454
55- log := logr .FromSlogHandler (slog .NewJSONHandler (os .Stdout , nil ))
55+ slogOpts := & slog.HandlerOptions {
56+ Level : slog .LevelInfo ,
57+ ReplaceAttr : logf .ReplaceTimeAttr ,
58+ }
59+
60+ if debug {
61+ slogOpts .Level = slog .Level (logf .VDebug )
62+ }
63+ if trace {
64+ slogOpts .Level = slog .Level (logf .VTrace )
65+ }
66+
67+ log := logr .FromSlogHandler (slog .NewJSONHandler (os .Stdout , slogOpts ))
5668 logf .SetDefaultLogger (log )
5769 ctx := logf .IntoContext (context .Background (), log )
5870
You can’t perform that action at this time.
0 commit comments