[Gambas-user] Logging errors in apps running as Application.Daemon
adamnt42 at ...626...
adamnt42 at ...626...
Wed Jun 21 11:47:36 CEST 2017
On Wed, 21 Jun 2017 02:17:27 -0700 (MST)
alexchernoff <alexchernoff at ...67...> wrote:
> Peace to all,
>
> I have some Gb projects that are in Application.Daemon mode. But sometimes
> if process dies for whatever reason, I can't see what the last error was. I
> have to run it in a console without daemonizing and wait for it to die and
> show last reason (like "#13: Null object" or something).
>
> Can this be logged to a file? So at least the last output the interpreter
> spits out is logged...
>
> Cheers!
>
>
>
In this case, probably the easiest is to redirect stdout and stderr to a file somewhere.
The commands you should look at are:
OUTPUT TO and
ERROR TO
(and you'll have to write the necessary guff to set up the file, etc etc of course)
hth
bruce
--
B Bruen <adamnt42 at ...3379... (sort of)>
More information about the User
mailing list