Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails deleting development.log lines (not file itself)

Is it safe to delete the lines in the development.log in your rails application?

I've been developing for awhile and that file now has over 50 millions lines...It's in the gitignore file so it's not causing problems when using git but I access it a lot and have to wait for it to load then scroll to the bottom...

I would imagine it's fine to delete the lines (not the file itself) but I just thought i'd ask the experts first.

Thanks guys/gals

like image 934
Justin Avatar asked Oct 23 '13 18:10

Justin


1 Answers

you can delete the file itself if you are not going to need the history. Restart server and it will be automatically created back again.

If you don't want to delete the file, emptying it is perfectly fine.

echo "" > log/development.log
like image 137
usha Avatar answered Sep 22 '22 01:09

usha