[Gambas-user] how to log to stdout/stderr

PICCORO McKAY Lenz mckaygerhard at ...626...
Fri Jul 14 02:21:09 CEST 2017


in part you have right fernando.. but that was dicuss several time
previously.. i want to no made special commands to daemonize my app.. i
want my app are daemon by selft..

now my app are a property daemon.. and every night at 00:00 restart all
setting and starts a new day to regist people..

the log must also be manage by the application.. if not then its not a
proper daemon..

the nohup trick not always work.. for that there's the gambas redirection
print.. that's why i ask previously how i detec if are runnig inside ide..
if are inside ide. let normal print, if not, redirect...

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2017-07-13 19:54 GMT-04:00 Fernando Cabral <fernandojosecabral at ...626...>:

> 2017-07-13 17:11 GMT-03:00 Tobias Boege <taboege at ...626...> said:
>
> > As we discussed recently [1], stdout and stderr are redirected to
> /dev/null
> > when you daemonise, so there is not really any value in wanting to print
> > there if you want to make a daemon.
>
>
> I don't know if I have understood you correctly and completely.
>  I am an old timer and Linux may have changed things as compared to UNIX.
> A daemon is supposed to run in the background. Typically, when you put
> something to
> run in the background, Unix would send the standard output to... standard
> output.
>
> Now, if you do "nohup something.gambas", standard outuput will to to
> "nohup.out".
> But, if you do "nohup something.gambas >x &" or "something.gambas >x",
> standard output wll be sent to "x".
>
> In any case, if you don't want to preserve any output, you should redirect
> stderr and
> stdout to /dev/null.
>
> I would guess that a daemon started at startup or by cron would give the
> same result.
> Am I wrong?
>
> Regards
>
> - fernando
>
> > [1] https://sourceforge.net/p/gambas/mailman/gambas-user/
> > thread/1498036647346-59450.post%40n7.nabble.com/#msg35904830
> > [2] https://stackoverflow.com/questions/17954432/creating-a-
> > daemon-in-linux
> >
> > --
> > "There's an old saying: Don't change anything... ever!" -- Mr. Monk
> >
> > ------------------------------------------------------------
> > ------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
>
>
> --
> Fernando Cabral
> Blogue: http://fernandocabral.org
> Twitter: http://twitter.com/fjcabral
> e-mail: fernandojosecabral at ...626...
> Facebook: f at ...3654...
> Telegram: +55 (37) 99988-8868
> Wickr ID: fernandocabral
> WhatsApp: +55 (37) 99988-8868
> Skype:  fernandojosecabral
> Telefone fixo: +55 (37) 3521-2183
> Telefone celular: +55 (37) 99988-8868
>
> Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
> nenhum político ou cientista poderá se gabar de nada.
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list