forked from Elara6331/itd
Add debug logs
This commit is contained in:
parent
9939f724c4
commit
9034ef7c6b
2
go.mod
2
go.mod
@ -15,7 +15,7 @@ require (
|
|||||||
github.com/smallnest/rpcx v1.7.4
|
github.com/smallnest/rpcx v1.7.4
|
||||||
github.com/urfave/cli/v2 v2.3.0
|
github.com/urfave/cli/v2 v2.3.0
|
||||||
github.com/vmihailenco/msgpack/v5 v5.3.5
|
github.com/vmihailenco/msgpack/v5 v5.3.5
|
||||||
go.arsenm.dev/infinitime v0.0.0-20220424014025-bebd1017c532
|
go.arsenm.dev/infinitime v0.0.0-20220424030849-6c3f1b14c948
|
||||||
golang.org/x/text v0.3.7
|
golang.org/x/text v0.3.7
|
||||||
)
|
)
|
||||||
|
|
||||||
|
4
go.sum
4
go.sum
@ -560,8 +560,8 @@ github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
|
|||||||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||||
github.com/yuin/goldmark v1.4.4 h1:zNWRjYUW32G9KirMXYHQHVNFkXvMI7LpgNW2AgYAoIs=
|
github.com/yuin/goldmark v1.4.4 h1:zNWRjYUW32G9KirMXYHQHVNFkXvMI7LpgNW2AgYAoIs=
|
||||||
github.com/yuin/goldmark v1.4.4/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg=
|
github.com/yuin/goldmark v1.4.4/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg=
|
||||||
go.arsenm.dev/infinitime v0.0.0-20220424014025-bebd1017c532 h1:HOFaxlEKacGw1nDs23qRv+FTX+PR+v4l1Sujfq5S3pc=
|
go.arsenm.dev/infinitime v0.0.0-20220424030849-6c3f1b14c948 h1:OX1SyEIFz4ae2z468lBQvRTNRvqLEwjfJ8lcssUH5+w=
|
||||||
go.arsenm.dev/infinitime v0.0.0-20220424014025-bebd1017c532/go.mod h1:1cBQ3fp6QlRbSqu9kEBAHsVThINj31FtqHIYVsQ7wgg=
|
go.arsenm.dev/infinitime v0.0.0-20220424030849-6c3f1b14c948/go.mod h1:1cBQ3fp6QlRbSqu9kEBAHsVThINj31FtqHIYVsQ7wgg=
|
||||||
go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
|
go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
|
||||||
go.opentelemetry.io/otel v0.19.0/go.mod h1:j9bF567N9EfomkSidSfmMwIwIBuP37AMAIzVW85OxSg=
|
go.opentelemetry.io/otel v0.19.0/go.mod h1:j9bF567N9EfomkSidSfmMwIwIBuP37AMAIzVW85OxSg=
|
||||||
go.opentelemetry.io/otel v1.6.3 h1:FLOfo8f9JzFVFVyU+MSRJc2HdEAXQgm7pIv2uFKRSZE=
|
go.opentelemetry.io/otel v1.6.3 h1:FLOfo8f9JzFVFVyU+MSRJc2HdEAXQgm7pIv2uFKRSZE=
|
||||||
|
5
itd.toml
5
itd.toml
@ -28,4 +28,7 @@
|
|||||||
|
|
||||||
[weather]
|
[weather]
|
||||||
enabled = true
|
enabled = true
|
||||||
location = "Los Angeles, CA"
|
location = "Los Angeles, CA"
|
||||||
|
|
||||||
|
[logging]
|
||||||
|
level = "info"
|
7
main.go
7
main.go
@ -54,6 +54,11 @@ func main() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
level, err := zerolog.ParseLevel(k.String("logging.level"))
|
||||||
|
if err != nil || level == zerolog.NoLevel {
|
||||||
|
level = zerolog.InfoLevel
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize infinitime library
|
// Initialize infinitime library
|
||||||
infinitime.Init()
|
infinitime.Init()
|
||||||
// Cleanly exit after function
|
// Cleanly exit after function
|
||||||
@ -66,7 +71,7 @@ func main() {
|
|||||||
Whitelist: k.Strings("conn.whitelist.devices"),
|
Whitelist: k.Strings("conn.whitelist.devices"),
|
||||||
OnReqPasskey: onReqPasskey,
|
OnReqPasskey: onReqPasskey,
|
||||||
Logger: log.Logger,
|
Logger: log.Logger,
|
||||||
LogLevel: zerolog.WarnLevel,
|
LogLevel: level,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Connect to InfiniTime with default options
|
// Connect to InfiniTime with default options
|
||||||
|
Loading…
Reference in New Issue
Block a user