mingrammer / flog

:tophat: A fake log generator for common log formats
MIT License
1.12k stars 135 forks source link

Feature Request: Output logs to network connection #39

Open asachs01 opened 3 years ago

asachs01 commented 3 years ago

As a flog user, I'd like to be able to use it to send test logs to a log management system like Splunk or Graylog. Presently, I have to output to a file, or try and netcat the output to a specific endpoint, which seems rather cumbersome. Adding the ability to directly output to a given endpoint (like an IP/hostname) would shorten the amount of steps I need to take to send flogs logs off.

mingrammer commented 3 years ago

You can output the logs to stdout (default mode), and pipe the output to network connections.

$ flog -n 100 | nc ...
asachs01 commented 3 years ago

@mingrammer Right, completely doable and it's what I'm currently doing. But it would be nice to have a --host sort of option to be able to specify a remote host rather than using nc.

lebe-dev commented 1 year ago

@asachs01 this feature will add unnecessary complexity. if you don't want to use pipes with netcat, you can wrap it into a bash script with arguments.