Skip to content

Commit 2097398

Browse files
committed
Add ns time precision to log output.
1 parent 37c0ef5 commit 2097398

File tree

1 file changed

+6
-0
lines changed
  • cmd/chirpstack-gateway-bridge

1 file changed

+6
-0
lines changed

cmd/chirpstack-gateway-bridge/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package main
22

33
import (
4+
"time"
5+
46
"github.com/brocaar/chirpstack-gateway-bridge/cmd/chirpstack-gateway-bridge/cmd"
57
paho "github.com/eclipse/paho.mqtt.golang"
68
log "github.com/sirupsen/logrus"
@@ -28,6 +30,10 @@ func enableClientLogging() {
2830
}
2931

3032
func init() {
33+
log.SetFormatter(&log.TextFormatter{
34+
TimestampFormat: time.RFC3339Nano,
35+
})
36+
3137
enableClientLogging()
3238
}
3339

0 commit comments

Comments
 (0)