Disappearing Log Files

Post your questions and help other users.

Moderator: Martin

Post Reply
GlueGuy
Posts: 3
Joined: 22 Nov 2015 20:37

Disappearing Log Files

Post by GlueGuy » 22 Nov 2015 21:44

I'm a fairly new Automagic user and having found it I'm now a little obsessed with automating a myriad of things. 8-) However, being a noob - please forgive my ignorance if the answer to my question is already well-known to the pillars of the Automagic community.

I'm having trouble troubleshooting some of my flows because the log files seem to be saved for only a few minutes. The furthest back in time I've been able to view a log event for any flow is about 15 minutes.

In preferences, I've tried selecting "Log to SD card" (and deselecting it) with no apparent difference in how long a logged event is retained. Out of desperation, I've also turned on and off the "Debug log (Writes more information to the log)" setting with no apparent change. Is there a setting that I'm missing that allows you to specify how long log events are kept? Or maybe a "Retain forever" setting? I would be most grateful for any guidance.

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: Disappearing Log Files

Post by kintrupf » 23 Nov 2015 07:00

I also noticed this behavior. If a flow fails or produces an unexpected result and I want to look at the log a few minutes later almost all of the time the log is empty (or has only very recent entries).
The setting of "Log to SD card" does not seem to make a difference.

It would be great if an option of a flow could make log entries of that flow more persistent.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Disappearing Log Files

Post by Martin » 24 Nov 2015 14:22

Hi,

The log is shared across all flows and only records the last few hundred entries so if you have flows that log a lot of stuff, it will only record the last few minutes. The option Log to SD card stores a separate log file in /storage/emulated/0/Automagic/log.txt which can contain up to 500kb of data and another file /storage/emulated/0/Automagic/log_old.txt that contains the previous 500kb. You have to use a text editor like Jota Text Editor to open the files.

Regards,
Martin

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: Disappearing Log Files

Post by kintrupf » 25 Nov 2015 09:24

Martin wrote: The log is shared across all flows and only records the last few hundred entries so if you have flows that log a lot of stuff, it will only record the last few minutes. The option Log to SD card stores a separate log file in /storage/emulated/0/Automagic/log.txt which can contain up to 500kb of data and another file /storage/emulated/0/Automagic/log_old.txt that contains the previous 500kb. You have to use a text editor like Jota Text Editor to open the files.
Or, if there are a lot of flows, like on my device, getting a useable log is next to impossible, because no flow will ever record more than its last minute or so :(
And looking at a dumped 500k log file on a small screen is .... challenging, especially since the log entries are only sorted by time and not by flow and thus intermingled.

Getting an optional and persistent log per flow would be great, even if it would sacrifice some battery or extra CPU for it (hence optional, default off).

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Disappearing Log Files

Post by Martin » 26 Nov 2015 19:30

I add it to the todo list. A log file per flow or a way to reduce/increase the log level for a flow could definitely be useful.
A way to load the SD log with filtering capabilities would also be good.

skiptannen
Posts: 82
Joined: 13 Jan 2014 21:39

Re: Disappearing Log Files

Post by skiptannen » 27 Nov 2015 16:35

I agree that having a log per flow would be a huge help, and being able to change the log level for individual flows would be nice too. But if setting a log level per flow is too much coding, just providing the ability to set debug mode for individual flow logs would be great.

Post Reply