Page 1 of 1

Wait for logged events

Posted: 03 Sep 2017 13:47
by Bluscre
Sometimes i want flows to run at a event not recognised by any triggers, so i'd love to have some easy and simple trigger that attaches to logcat/demsg where i can use single line regex to fire the event i wait for. That would give the users the ability to react on almost any app event/failure etc that won't be covered by "official" events.

I know that you can use a 'watch file' trigger but that is hard to set up since you'd have to do the 'what changed checks' manually so a seperate trigger would be more convinient. Also this trigger should have root and maybe even xposed access to get all the log files a user could want to read. Also that does neither return the content of the file before it changed, nor after.

Re: Wait for logged events

Posted: 03 Sep 2017 15:51
by Desmanto
You mean the logcat from android? We can use execute root command to run the logcat, but I don't how we can filter thru that massive data logging running continuously. Maybe it can filter for a short period of time. But to run it all day would have killed the battery faster.

But for short period logging, I would agree this will be a nice feature. Especially if we can separate launched intent from other app and accessing the extras, which can be helpful in building start activities action.

Re: Wait for logged events

Posted: 04 Sep 2017 19:18
by Martin
Hi,

You could use trigger Command Output to see if there's some specific output in the logcat.
Please note that this trigger has the potential to consume a lot of battery depending on the command and the amount of generated output.

Regards,
Martin

Re: Wait for logged events

Posted: 04 Sep 2017 19:23
by Bluscre
Martin wrote:You could use trigger Command Output to see if there's some specific output in the logcat.
Any example for that? btw. i would prefer to see the trigger to be more like fail2ban so it attaches to a log file that you point it to and scans every added line for the text/glob/regex.
Also it should return that specific line as variable so flow creators could read (from) it :) just as a bonus ^
Martin wrote:Please note that this trigger has the potential to consume a lot of battery depending on the command and the amount of generated output.
In exchange for the tremendous possibilities i would be okay with that.

Re: Wait for logged events

Posted: 06 Sep 2017 19:49
by Martin
Sounds like a description of the trigger (including the bonus) :-)

The trigger Command Output contains a few examples when pressing the [...]-button of the command field. Most interesting logcat examples will likely require as root to be checked.
The trigger will provide a variable to the flow with the line that triggered the flow (Variable output, but also check the variables section in the help page of the trigger).

Regards,
Martin

Re: Wait for logged events

Posted: 21 Oct 2018 01:01
by Bluscre