|
@@ -24,6 +24,7 @@ import (
|
|
"github.com/google/gopacket/layers"
|
|
"github.com/google/gopacket/layers"
|
|
"github.com/google/gopacket/pcap"
|
|
"github.com/google/gopacket/pcap"
|
|
"github.com/hpcloud/tail"
|
|
"github.com/hpcloud/tail"
|
|
|
|
+ "github.com/kr/pretty"
|
|
"github.com/nats-io/nats"
|
|
"github.com/nats-io/nats"
|
|
"github.com/nats-io/nats/encoders/protobuf"
|
|
"github.com/nats-io/nats/encoders/protobuf"
|
|
"github.com/satyrius/gonx"
|
|
"github.com/satyrius/gonx"
|
|
@@ -272,6 +273,10 @@ func nginxLogCapture(logfile, format string) {
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if config.Trace {
|
|
|
|
+ pretty.Println(logEntry)
|
|
|
|
+ }
|
|
|
|
+
|
|
remote, err := logEntry.Field("remote_addr")
|
|
remote, err := logEntry.Field("remote_addr")
|
|
if err != nil {
|
|
if err != nil {
|
|
log.Println(err)
|
|
log.Println(err)
|