Generating Nginx Access Logs for Testing and Analysis
You can run this script with the following command:
python generate_logs.py --filename mylog.log --lines 5000
This will generate 5000 log lines in a file named mylog.log
. If you omit the --filename
and --lines
arguments, the defaults of access.log
and 2000 lines will be used.
Code Explanation on: https://linuxtech.in/generating-nginx-access-logs-for-testing-and-analysis/