writing to log file

1 view
Skip to first unread message

phil

unread,
Jan 6, 2009, 6:46:17 AM1/6/09
to simple-daemon
I don't know if this code (or group) is maintained and monitored, but,
I like this gem.. but the writing to the log file doesn't flush, so
you actually don't see anything in the log file until the process is
stopped.
Any good solutions to this?

(This is the behaviour on my OS X system at least)

madbox

unread,
Jan 6, 2009, 7:58:34 AM1/6/09
to simple-daemon
hi. i solved this problem(and some of others :) ) by fixing gem code.
i've submit (see prev. message in this group) a patch but it seems
that gem maintainer not watching this group very often.

so, i can help with source code only:
you can add someth like "log.sync = true" after "log = File.new("#
{daemon.classname}.log", "a")" in trunk/lib/simple-daemon.rb

phil

unread,
Jan 8, 2009, 8:28:19 AM1/8/09
to simple-daemon
Thanks!
I'll give that a try.
Reply all
Reply to author
Forward
0 new messages