From: Aldric Giacomoni Date: 2009-12-24T05:29:39+09:00 Subject: Re: logging, rolling file, permission denied Guillaume Guillaume wrote: > Hi, > > I'm trying out the excellent logging 1.3.0 gem inside my rails > application. It works nicely with stdout and file appenders but I'm > unable to using the rolling file appender config. After running some > debug sessions I found out that the write fails due to i'm not sure > what, I am certain that the file path is valid, so I conclude it must > have to do with file locks... > Are you trying to log .. Concurrently with the Rails log, or are you trying to replace the default Rails logger with your own? Look at this : http://mikenaberezny.com/2007/02/24/rails-logging-tips/ Keeping this in mind: One important point to remember is that the logfile object does not implicitly flush to the file by default. This means that your code must call logfile.flush for the data to be written out. Alternatively, you can set logfile.sync = true to turn on implicit flushing. -- Posted via http://www.ruby-forum.com/.