From: Dave Bass Date: 2008-05-31T20:21:29+09:00 Subject: Re: Unbuffered output with Logger (newbie question) Eric LIn wrote: > My suspicion is I'm not instantiating File correctly. Perhaps there > is an option for unbuffered output? File is a subclass of IO, and IO has a flush method, which File inherits. So you can do file.flush after each write to bypass Ruby's buffering. Pickaxe p. 509 says: "io.flush -- Flushes any buffered data within io to the underlying operating system (note that this is Ruby internal buffering only; the OS may buffer the data as well)." So you could try flushing the log file after each log.info call. I suspect this means subclassing Logger or modifying something within Logger; maybe someone more experienced could suggest how to do this. You're still at the mercy of the OS's buffering, which is additional to Ruby's. -- Posted via http://www.ruby-forum.com/.