# Log files deleted

**URL:** <https://www.ruby-forum.com/t/log-files-deleted/142261>\
**Category:** Rails\
**Created:** [July 5, 2008, 12:45pm UTC](https://www.ruby-forum.com/t/log-files-deleted/142261 "2008-07-05T12:45:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pederbl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/db5fbb/32.png) [@pederbl](https://www.ruby-forum.com/u/pederbl)\
**Post date:** [July 5, 2008, 12:45pm UTC](https://www.ruby-forum.com/t/log-files-deleted/142261/1 "2008-07-05T12:45:06Z")

</div>

Somehow my rails log files get deleted after some time.

The log files do get created properly when I restart my mongrel  
server. I usually have tail -f on the log files and they function  
well even after the files don’t exist anymore according to the file  
system.

I use the standard development.log and another other log file that I  
create as follows:

logfile\_query = File.open ( “#{RAILS\_ROOT}/log/query.log”, ‘a’ )  
logfile\_query.sync = true  
logger\_query = StatsLogger.new ( logfile\_query )  
silence\_warnings { Object.const\_set “LOGGER\_QUERY”, logger\_query }
