dwbutler / logstash-logger

Ruby logger that writes logstash events
MIT License
456 stars 118 forks source link

What's the story for log rotation when using this gem? #145

Closed arianf closed 6 years ago

arianf commented 6 years ago

I've previously had to use copytruncate with the regular Rails.logger, does using this gem require the use of copytruncate when outputting to file?

/home/rails/myapp/shared/log/production.json {
  daily
  missingok
  rotate 7
  notifempty
  copytruncate # needed by rails to avoid restart
  compress
  delaycompress
}
dwbutler commented 6 years ago

Yes, that seems right. LogStashLogger writes to a file the same way Rails does.