Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sleep not working #5

Closed
MachLearnPort opened this issue Aug 28, 2018 · 2 comments
Closed

Sleep not working #5

MachLearnPort opened this issue Aug 28, 2018 · 2 comments

Comments

@MachLearnPort
Copy link

Hello,

I was unable to get the sleep function to work using the provided example:
flog -t gz -o log.gz -n 3000 -s 10

The code would execute and generate the log.gz archive, but not update. Same outcome on both Mac and Win10.

@mingrammer
Copy link
Owner

mingrammer commented Aug 28, 2018

Hello,

In flog, the sleep function does not actually sleep every log generation, but only sets the interval of generation time between logs to be generated.

So, if you run flog -t gz -o log.gz -n 3000 -s 10, it will immediately generate a log file which has following logs for example.

...
68.140.112.91 - Stark2041 377 [2018-08-29T10:05:23+09:00] "DELETE /syndicate/interactive" 406 20676
50.11.46.218 - Rau3340 627 [2018-08-29T10:05:33+09:00] "DELETE /integrate/infomediaries" 100 3541
71.151.12.150 - Crist7675 658 [2018-08-29T10:05:43+09:00] "PUT /aggregate/back-end" 501 12070
196.226.112.172 - Pouros6637 175 [2018-08-29T10:05:53+09:00] "PUT /monetize/transparent/end-to-end/evolve" 304 2162
71.214.233.106 - Williamson7465 738 [2018-08-29T10:06:03+09:00] "POST /functionalities/e-enable/exploit" 400 21112
120.205.58.46 - Cronin1702 188 [2018-08-29T10:06:13+09:00] "POST /strategize/schemas/magnetic/intuitive" 406 8595
...

Each generation times in above logs are:

...
2018-08-29T10:05:23+09:00
2018-08-29T10:05:33+09:00
2018-08-29T10:05:43+09:00
2018-08-29T10:05:53+09:00
...

Yes, It does not update the log file every 10 seconds, but just creates a log file immediately.

@MachLearnPort
Copy link
Author

Ahhhhh, I miss understood that, my apologies. Also, thank you for the fast response. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants