Customize the log

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

Moderator: Martin

User avatar
Hit
Posts: 91
Joined: 20 Jan 2020 11:31

Re: Customize the log

Post by Hit » 13 May 2020 03:24

Similar or not, but I think it is not the same since what I want is that a button to disable log.

Then this idea happen:
  • If can disable the Auto logging only, not thing more change at all. All is still there but, yes no log except use log() in a <Script> or <Condition expression>, it's clearly that if you don't have a log() function in a script nothing in the log at all.
First I only request the button toggle log (not Auto log). But the second idea is ok.

What I want is pretty simple, nothing complicate.

And I think that <Hide log> and <Do not log> is clearly difference. Both is good but not the same. I just want to add an option. The developer know what to do himself.

If everyone think my idea is not good, I have nothing much to say. I just want to request what I think is simple and give condition for more ideas to come.

Regard.

vertigo
Posts: 147
Joined: 28 Oct 2018 00:28

Re: Customize the log

Post by vertigo » 13 May 2020 04:16

Another idea for simplifying the log: have an expand/collapse button, and when collapsed remove the extraneous lines and use delta values for time stamps instead. For example:

Code: Select all

41.954 Start executing condition 'Expression: containsElement(newList( "ch.gridvision.ppam.androidautomagic", "com.teslacoilsw.launcher" ), package_name)'
41.958 End executing condition 'Expression: containsElement(newList( "ch.gridvision.ppam.androidautomagic", "com.teslacoilsw.launcher" ), package_name)' with return value true
41.958 Flow continues executing with the next step.
41.958 Start executing condition 'Expression: containsElement(newList( "ch.gridvision.ppam.automagic", "com.teslacoilsw.launcher" ), package_name)'
41.964 End executing condition 'Expression: containsElement(newList( "ch.gridvision.ppam.automagic", "com.teslacoilsw.launcher" ), package_name)' with return value false
41.964 Flow continues executing with the next step.
would become

Code: Select all

0.004 Condition 'Expression: containsElement(newList( "ch.gridvision.ppam.androidautomagic", "com.teslacoilsw.launcher" ), package_name)' with return value true
0.006 Condition 'Expression: containsElement(newList( "ch.gridvision.ppam.automagic", "com.teslacoilsw.launcher" ), package_name)' with return value false
This removes the unnecessary "flow continues executing" lines and start lines--which are just a duplicate of the end lines minus the return value--and provides the time elapsed for the actions/conditions, which deals with the issue of not having the start times and gives @Desmanto what they want by providing the time it takes to perform the steps. It would make the log much more readable by reducing it to about a third of the size, shortening the remaining lines, and providing more useful time stamp info. Throw in some coloring and word wrap and the log would be significantly more manageable.

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

Re: Customize the log

Post by Desmanto » 13 May 2020 18:02

@Hit : I get your point. Some of us want a clean log, and only log when we want. This is especially helpful when tracking down a tiny devil bug in our code. When building a long flow, this tiny devil bug sometimes can takes up half of the development time. I am more to debug dialog style. When I am trying to find this tiny devil bug, I assigned multiple variables to the part I want to check the value, then anchor debug dialog to it. But some might prefer using log instead.

So as long as it is toggeable in the log view, I have no problem with it. (including all other option should be toggleable/configureable)

@vertigo : Your last comment is a good idea. I proposed the feature name as toggeable feature called "Simple logging", default to disabled. When enabled, it will hide the "Start executing ...", "End executing ...", "Flow continue executing ...". Leaving only the element it is executing.
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.

vertigo
Posts: 147
Joined: 28 Oct 2018 00:28

Re: Customize the log

Post by vertigo » 13 May 2020 22:31

I agree the simple logging should be disabled by default, but it should also remember the setting, so once disabled it shows that way every time until turned back off.

Locked