Logging within flow
Posted: 28 Apr 2019 17:39
I have a question about writing log information to a txt-file.
There is this flow i'm working on and i want to create log info around each corner in an efficient way.
The goal is to make it absolutely sure the info is being written (in case the flow unexpectedly stops), while at the same time being efficient in writing to the storage.
I can't decide to either:
1. Create variables in script-actions along the flow, and collect all info at the end to write a logfile all at once.
2. Write pieces of the logfile along the flow.
I'm thinking method #1 is the easiest, but still...
Pros: It's faster because AM does not need to do all the things like read-to-append and write text and such.
It's better for the the storage device to have it not being written to about 7 times in a row each time this flow runs (SSD commonly known writing-shenanigans).
Cons: Log security isn't optimal. Once the flow suddenly would stop due to whatever reason, no log info will be written at all.
There is this flow i'm working on and i want to create log info around each corner in an efficient way.
The goal is to make it absolutely sure the info is being written (in case the flow unexpectedly stops), while at the same time being efficient in writing to the storage.
I can't decide to either:
1. Create variables in script-actions along the flow, and collect all info at the end to write a logfile all at once.
2. Write pieces of the logfile along the flow.
I'm thinking method #1 is the easiest, but still...
Pros: It's faster because AM does not need to do all the things like read-to-append and write text and such.
It's better for the the storage device to have it not being written to about 7 times in a row each time this flow runs (SSD commonly known writing-shenanigans).
Cons: Log security isn't optimal. Once the flow suddenly would stop due to whatever reason, no log info will be written at all.