Wait for logged events

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
User avatar
Bluscre
Posts: 145
Joined: 31 Aug 2017 13:58
Location: Germany
Contact:

Wait for logged events

Post by Bluscre » 03 Sep 2017 13:47

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.
Unofficial AutoMagic Telegram Group: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Wait for logged events

Post by Desmanto » 03 Sep 2017 15:51

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

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

Re: Wait for logged events

Post by Martin » 04 Sep 2017 19:18

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

User avatar
Bluscre
Posts: 145
Joined: 31 Aug 2017 13:58
Location: Germany
Contact:

Re: Wait for logged events

Post by Bluscre » 04 Sep 2017 19:23

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.
Unofficial AutoMagic Telegram Group: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.

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

Re: Wait for logged events

Post by Martin » 06 Sep 2017 19:49

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

User avatar
Bluscre
Posts: 145
Joined: 31 Aug 2017 13:58
Location: Germany
Contact:

Re: Wait for logged events

Post by Bluscre » 21 Oct 2018 01:01

Unofficial AutoMagic Telegram Group: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.

Locked