|
@@ -48,6 +48,7 @@ var (
|
|
|
useXForwardedAsSource = flag.Bool("use-x-forwarded", false, "Use the IP address in X-Forwarded-For as source")
|
|
|
useVhostAsSource = flag.Bool("use-vhost-as-source", false, "Use the Vhost as source")
|
|
|
trace = flag.Bool("trace", false, "Trace the packet capturing")
|
|
|
+ tailPoll = flag.Bool("tail-poll", false, "use file polling to detect file changes when tailing logrfiles")
|
|
|
apacheLog = flag.String("apache-log", "", "Parse an Apache Log file")
|
|
|
apacheReplay = flag.String("apache-replay", "", "Apache log file to replay into the system")
|
|
|
nginxLog = flag.String("nginx-log", "", "Nginx log file to tail")
|
|
@@ -95,6 +96,7 @@ type Config struct {
|
|
|
Quiet bool
|
|
|
Protocol string
|
|
|
Trace bool
|
|
|
+ TailPoll bool
|
|
|
ApacheLog string
|
|
|
ApacheReplay string
|
|
|
NginxLog string
|
|
@@ -130,6 +132,7 @@ func (c Config) print() {
|
|
|
fmt.Printf("ReconnectToNatsAfter: %s\n", c.ReconnectToNatsAfter.String())
|
|
|
fmt.Printf("SleepFor: %s\n", c.SleepFor.String())
|
|
|
fmt.Printf("RequestsFile: %s\n", c.RequestsFile)
|
|
|
+ fmt.Printf("TailPoll: %t\n", c.TailPoll)
|
|
|
fmt.Printf("Apache Log: %s\n", c.ApacheLog)
|
|
|
fmt.Printf("Apache Replay: %s\n", c.ApacheReplay)
|
|
|
fmt.Printf("Nginx Log: %s\n", c.NginxLog)
|
|
@@ -753,6 +756,7 @@ func loadConfig() {
|
|
|
config.UseXForwardedAsSource = *useXForwardedAsSource
|
|
|
config.UseVhostAsSource = *useVhostAsSource
|
|
|
config.Protocol = *protocol
|
|
|
+ config.TailPoll = *tailPoll
|
|
|
config.ApacheLog = *apacheLog
|
|
|
config.ApacheReplay = *apacheReplay
|
|
|
config.NginxLog = *nginxLog
|