Logs are empty until a process is stopped

96 views
Skip to first unread message

Ivan el Magnifico

unread,
Oct 27, 2011, 9:47:22 AM10/27/11
to god.rb
Hi,

I'm relatively new to god, but I've been able to set it up mostly
right.

On issue I haven't been able to fix, is for this watch:

God.watch do |w|
w.dir = 'some dir'
w.name = 'rapns'
w.group = 'some app'
w.interval = 30.seconds
w.pid_file = "some pid.pid"
w.gid = 'user'
w.uid = 'group'
w.start = "bundle exec rapns production --foreground >
somelog.log"
w.log = "some path/god.log"
end

Why the --foreground switch and the output redirection you ask? Well,
I've tested several approaches, and none of them write to the log.
With just "bundle exec rapns production", the god.log file does get
written, but only *after* I kill the rapns process. With the method I
show, it's the same, but for the somelog.log file.

Is this an issue with the rapns process or is there something I'm
doing all wrong?

Thanks!

- Ivan

Dave Newman

unread,
Oct 27, 2011, 5:30:57 PM10/27/11
to god...@googlegroups.com
It could be the rapns process not flushing STDOUT.  Try adding:

STDOUT.sync = true

to bin/rapns

-- 
Dave Newman @whatupdave http://whatupdave.com

--
You received this message because you are subscribed to the Google Groups "god.rb" group.
To post to this group, send email to god...@googlegroups.com.
To unsubscribe from this group, send email to god-rb+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/god-rb?hl=en.

Ivan el Magnifico

unread,
Oct 27, 2011, 9:06:51 PM10/27/11
to god.rb
Thanks! I'll try that out.

On Oct 27, 4:30 pm, Dave Newman <ddanger...@gmail.com> wrote:
>  It could be the rapns process not flushing STDOUT.  Try adding:
>
> STDOUT.sync = true
>
> to bin/rapns
>
> --
> Dave Newman @whatupdavehttp://whatupdave.com
>
>
>
>
>
>
>
> On Friday, 28 October 2011 at 12:47 AM, Ivan el Magnifico wrote:
> > Hi,
>
> > I'm relatively new to god, but I've been able to set it up mostly
> > right.
>
> > On issue I haven't been able to fix, is for this watch:
>
> > God.watch do |w|
> >  w.dir = 'some dir'
> > w.name (http://w.name) = 'rapns'
> >  w.group = 'some app'
> >  w.interval = 30.seconds
> >  w.pid_file = "some pid.pid"
> >  w.gid = 'user'
> >  w.uid = 'group'
> >  w.start = "bundle exec rapns production --foreground >
> > somelog.log"
> >  w.log = "some path/god.log"
> > end
>
> > Why the --foreground switch and the output redirection you ask? Well,
> > I've tested several approaches, and none of them write to the log.
> > With just "bundle exec rapns production", the god.log file does get
> > written, but only *after* I kill the rapns process. With the method I
> > show, it's the same, but for the somelog.log file.
>
> > Is this an issue with the rapns process or is there something I'm
> > doing all wrong?
>
> > Thanks!
>
> > - Ivan
>
> > --
> > You received this message because you are subscribed to the Google Groups "god.rb" group.
> > To post to this group, send email to god...@googlegroups.com (mailto:god...@googlegroups.com).
> > To unsubscribe from this group, send email to god-rb+un...@googlegroups.com (mailto:god-rb+un...@googlegroups.com).
Reply all
Reply to author
Forward
0 new messages