kiritbasu / fake-apache-log-generator Goto Github PK
View Code? Open in Web Editor NEWGenerate a boatload of Fake Apache Log files very quickly
License: Apache License 2.0
Generate a boatload of Fake Apache Log files very quickly
License: Apache License 2.0
I installed all the dependencies but i dont know why i am getting the runtime error
C:\Users\home\Fake-Apache-Log-Generator>python apache-fake-log-gen.py
Traceback (most recent call last):
File "C:\Users\home\Fake-Apache-Log-Generator\apache-fake-log-gen.py", line 29, in iter
raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\home\Fake-Apache-Log-Generator\apache-fake-log-gen.py", line 62, in
for case in switch(output_type):
RuntimeError: generator raised StopIteration
Executing this command gives:
$ python apache-fake-log-gen.py -n 100 -o GZ -s 10
Traceback (most recent call last):
File "apache-fake-log-gen.py", line 4, in
import pytz
ImportError: No module named pytz
I'm on Amazon Linux ami-0f2176987ee50226e
Hi kiritbasu,
I saw that the -h had additional information that is not found in the Github Detailed help.
Can you please add it?
love your work
usage: apache-fake-log-gen.py [-h] [--output {LOG,GZ,CONSOLE}]
[--log-format {CLF,ELF}] [--num NUM_LINES]
[--prefix FILE_PREFIX] [--sleep SLEEP]
Fake Apache Log Generator
optional arguments:
-h, --help show this help message and exit
--output {LOG,GZ,CONSOLE}, -o {LOG,GZ,CONSOLE}
Write to a Log file, a gzip file or to STDOUT
--log-format {CLF,ELF}, -l {CLF,ELF}
Log format, Common or Extended Log Format
--num NUM_LINES, -n NUM_LINES
Number of lines to generate (0 for infinite)
--prefix FILE_PREFIX, -p FILE_PREFIX
Prefix the output file name
--sleep SLEEP, -s SLEEP
Sleep this long between lines (in seconds)
I want to generate logs within 5 seconds and here is my command line:
$ python apache-fake-log-gen.py -n 100 -o LOG -s 5
Error:
Traceback (most recent call last):
File "apache-fake-log-gen.py", line 112, in
time.sleep(args.sleep)
KeyboardInterrupt
I'm working on a application which scans the log files and then pushes the data from the file to a REST API Service.
If there is a option to include the path where files to be generated it will be better.
Example.
$ python apache-fake-log-gen.py --outputPath "\var\www\html\app-logs\"
It would be nice to use the log generator in Docker to avoid manual installation of the dependencies.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.