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