[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: daemon vs. savelog ???



nate wrote:
> 
> <quote who="Michael D. Schleif">
> >
> > I have a compiled application that runs find under woody.
> >
> > This app spews data on STDOUT while running.  I want to run this app as a
> > daemon (continuously running in background) and I want to save the stdout
> > data to a logfile.  In fact, I am doing this now and everything is OK:
> >
> >        $DAEMON >>$LOG 2>&1 &
> >
> > Except, when _savelog_ rotates the logfile, the application writes to the
> > first archive, rather than the file with original logfile label:
> 
> one option is to drop savelog, use logrotate, and have logrotate
> restart your process (or -HUP if your process supports it) after
> the log is rotated via the 'postrotate' option(I believe)
> 
> or re-code the program to log to syslog, that way syslog handles
> everything (through savelog or logrotate).
> 
> i reaaaaaaaaaaly don't like savelog :(

Thank you, for your participation.

Actually, I was a bit misleading and this is running on an embedded
system running slink, due to glibc size issues ;<

savelog is already there and logrotate, my erstwhile favorite, is not. 
Yes, logger is available -- can it handle a stdout stream?  I really
want its own logfile, too.

Therefore, I am willing to shell script (ash ;<) some other rotational
scheme.

How do ``real'' daemon programs get around this issue?  Is it the kill
-HUP $PID trick?  I've never been too comfortable with signals . . .

Other ideas?

-- 

Best Regards,

mds
mds resource
888.250.3987

Dare to fix things before they break . . .

Our capacity for understanding is inversely proportional to how much we
think we know.  The more I know, the more I know I don't know . . .


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: