Last active
March 28, 2016 17:23
-
-
Save adriagalin/3bc1065eaf7b00408f08 to your computer and use it in GitHub Desktop.
Log generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
period = ARGV[0] | |
while true | |
f = File.open("access.log", "a") | |
value = ["GET", "POST"].sample | |
output = "#{Time.now.strftime("%T")} #{value} /test/test/test.html" | |
f.puts output | |
puts output | |
f.close | |
sleep(period.to_f) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment