If you are talking about rails application log rotation, you can do this by putting
config.logger = Logger.new(config.log_path, 10, 1024**2)
in the environment file. The second argument is the number of .log files that you would like to save, and the third is the size in bytes that the files can reach before they are rotated. This configuration means 10 files of 1 megabyte size. It may not be as easy to configure as logrotate (without support for compression, etc.), but it allows you to store all your log files in your application. This usually works for me.
Also found this if you want to stick with log rotation through nginx.
source share