πŸŽ“ Flow Logs

by Patrick Corgan

Version 1 (August 4, 2022)

Download (6 downloads)

Learn everything you need to know in order to monkey around with a flow's log. This was never meant to be a user-facing operation, so there are a few eccentricities to be aware of.

A flow's log in Automate is stored as a file with the path "/data/data/com.llamalab.automate/app_logs/flow-{flowID}.log". This means that you can treat a flow's log just like any other file: display it or parts of it to the user, read from it, write to it, and so on. If you want to clear the log, do not delete the file. If the file is deleted - even if it is recreated - the log will no longer display on the flow screen. Also, every log entry should end with a newline, including the final one, otherwise the entry won't display on the flow screen. Note that a flow can manipulate not just its own log, but that of any flow, running or not.

You can also control the color of a log entry. Sort of. You have four choices: red; yellow; grey; or the default black if you're using the light theme, or white with the dark theme. The color is controlled by 20th character of the entry: "F" for red (fault), "W" for yellow (warning), or "D" for grey (debug). Anything else is default color, and all the other characters can be anything at all. The unconnected block (#9) contains examples of Automate's method of logging that makes sensible use of the first 19 characters of an entry.

Thank you to Ricardo FernΓ‘ndez Serrata and his flow "Error text template" (https://llamalab.com/automate/community/flows/41617), and to THE EXP's comment on that flow, from both of which I borrowed liberally and shamelessly.

------------------------------
π˜‰π˜Ί π˜—π˜’π˜΅π˜³π˜ͺ𝘀𝘬 𝘊𝘰𝘳𝘨𝘒𝘯
πŸ› οΈπ•”π• π•žπ•žπ•–π•Ÿπ•₯𝕀 π•’π•Ÿπ•• π•”π•£π•šπ•₯π•šπ•”π•šπ•€π•žπ•€ π•¨π•–π•π•”π• π•žπ•–βš’οΈ
------------------------------

5.0 average rating from 1 reviews

5 stars
1
4 stars
0
3 stars
0
2 stars
0
1 star
0
Reports
0

Rate and review within the app in the Community section.