Page 1 of 1

Log file for a single flow

Posted: 23 Mar 2017 18:25
by ewill
I am trying to debug a flow that I have. It is triggered upon connection to a wifi. When I run it manually, it works perfectly. However it appears that it does not always run as expected all the time.

Is there any way to log activities (to a file) just for that flow? That would help me figure out what may be wrong.

Re: Log file for a single flow

Posted: 23 Mar 2017 19:06
by mattd_nf
If you look at the logs from within the flow instead of through the main menu I believe it will show you only the logs for that flow. There is also an option to filter the logs (the pencil at the top right of the log screen) which you could use to filter if you wanted.

Re: Log file for a single flow

Posted: 23 Mar 2017 19:22
by ewill
mattd_nf wrote:If you look at the logs from within the flow instead of through the main menu I believe it will show you only the logs for that flow. There is also an option to filter the logs (the pencil at the top right of the log screen) which you could use to filter if you wanted.
Thanks for the suggestion however that log is only useful for recent activity. By the time I notice that the flow didn't execute properly it can be hours later and by that time there is nothing in that log.

What I was hoping to do is to create a log for just execution of that flow so I can go back and review the last number of executions (over the last day or so) to see if I can figure our the issue.

Ideally, I would have an action at the end of the flow that would take the log from that execution and send it to me as an email, but I don't see a way to do that.

Re: Log file for a single flow

Posted: 24 Mar 2017 21:00
by Martin
Hi,

You can also enable the option Log to SD card in the preferences of Automagic which will record a much longer log (500kb of data). You can open the SD log within Automagic by opening the regular log and then select menu->Open SD Log.
I can also recommend to send the SD log by mail to yourself so you can analyze the log on a real computer. Use menu->Send Log to send the log by mail to yourself.

Alternatively you could also add a few actions Write to File to the flow to write your own log file.

Regards,
Martin