Skip to content

Instantly share code, notes, and snippets.

@Repox
Created August 18, 2014 19:10
Show Gist options
  • Save Repox/e6cbee28c4310c3885e9 to your computer and use it in GitHub Desktop.
Save Repox/e6cbee28c4310c3885e9 to your computer and use it in GitHub Desktop.
Laravel logrotate configuration (1 daily rotation, 7 days retention)
/home/laravel/app/storage/logs/laravel.log {
daily
missingok
rotate 7
maxage 7
compress
notifempty
create 755 user group
su user group
}
@chusiang
Copy link

It's working, thank you.

@hsleewis
Copy link

I have the same config file, but somehow only a small part of my log entries get into the logfile created by logrotate.
I have a system where a webhook dispatches a job (1), that job dispatches another job (2) and that job dispatches multiple jobs (3).
The whole system works flawless, but only the log entries created at (1) make it into the log file created by logrotate.

Any ideas?

@hsleewis
Copy link

Just found the solution, add "copytruncate" so the actual laravel.log file stays the same. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment