Git Product home page Git Product logo

fake-apache-log-generator's People

Contributors

aojea avatar atiaxi avatar csmanioto avatar kiritbasu avatar wreckoner avatar zhangoose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fake-apache-log-generator's Issues

RuntimeError: generator raised StopIteration

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

ImportError: No module named pytz

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

Log format flag missing in Detailed help section

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)

time.sleep(args.sleep)

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

Add Option to specify output path for the generated log file.

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\"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.