aserafin / grape_logging

Request logging for Grape!
MIT License
147 stars 76 forks source link

Add file syncing to README example #11

Closed jtmarmon closed 9 years ago

jtmarmon commented 9 years ago

Got stuck on this and I figured most people would want this on by default

aserafin commented 9 years ago

thanks for contribution @jtmarmon! If you could also mention that syncing may not be the best idea for production environment it would be good to merge :)

jtmarmon commented 9 years ago

@aserafin - why is that so? The Rails logger sync is on by default. So is the Ruby logger https://github.com/ruby/ruby/blob/trunk/lib/logger.rb#L585

jtmarmon commented 9 years ago

furthermore - if your process is forcefully killed, as might need to happen in a production environment, none of the logs for the process's life are recovered.

aserafin commented 9 years ago

Of course you're right :) I just meant that maybe there are better choices for production logging, like syslog etc. but it might be out of scope of this project to kind of insist of using them. I will merge the PR, thanks!