Browse Source

more nginx tracing

Tobias von Dewitz 6 years ago
parent
commit
b6a8f5c11e
1 changed files with 4 additions and 0 deletions
  1. 4 0
      main.go

+ 4 - 0
main.go

@@ -288,6 +288,10 @@ func nginxLogCapture(logfile, format string) {
 
 
 		xff, err := logEntry.Field("http_x_forwarded_for")
 		xff, err := logEntry.Field("http_x_forwarded_for")
 		if err != nil && xff != "" {
 		if err != nil && xff != "" {
+			if config.Trace {
+				log.Printf("Using XFF: %s\n", xff)
+			}
+
 			remote = xff
 			remote = xff
 		}
 		}