Вопрос

In my Rails 4's production log file, I see requests are logged together, not one after one.... How could I fix this issue??

Example Log

Started GET "/cars" for 127.0.0.1 at 2013-09-25 08:44:54 -0700
Started GET "/cars" for 127.0.0.1 at 2013-09-25 08:44:54 -0700 
Rendered index.html 
Rendered index.html

I want it to be like this

Started GET "/cars" for 127.0.0.1 at 2013-09-25 08:44:54 -0700
Rendered index.html 
Started GET "/cars" for 127.0.0.1 at 2013-09-25 08:44:54 -0700 
Rendered index.html
Это было полезно?

Решение

I doubt it's a logging issue so much as an accurate representation of what's happening. If 2 requests occur at the exact same time (ie. 2013-09-25 08:44:54 -0700), then neither will render until the other has started. Make sense?

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top