Add Transaction Log fields

In my code if I add activity “Add some transaction log fields” and “Delete transaction log fields” immediately as next step, what happens?

Thank you,

@A_Learner,

Whatever additional transaction log fields you had added will be removed means will not be logged in Log Message activity.

Thank you, @ashokkarale
So my question is - since I just added transaction log fields in one line, do they show up in logs? Even though I deleted it in the next line?

Thank you,

@A_Learner,

No, they will not show up after deleting.

1 Like

Hi @A_Learner,

Add log fields and then remove log fields is typically used to capture certain metrics required to calculate different automation KPIs.

When you add log fields, after that in next log statements, additional log fields will be shown unless you remove those added log fields.

For e.g. You added certain log fields, then added a Log message activity, then you will be able to see those additional column added under that Log message activity.

Please note:

  1. those added log fields will not directly appear under Logs. You will have to click “i” of that log message shown in logs, that is where those additional fields will be visible.

And below is what I see when I clicked on “i” right next to my “Kibana Log” message, Last 6 fields that you see in the below screenshot was the one that I added using “Add log fields” and then after printing this “Kibana log” message, i deleted those log fields, so in any of my further logs, I dont see these additional log fields:

Please note: if you added log fields, and then right away removed log fields without any ‘Log message’ activity in between, you will not be able to see these additional columns. You need to have atleast 1 Log message activity in between to be able to see these additional fields.

Hope this helps.

Regards
Sonali

1 Like

Hi @A_Learner

If you don’t add a Log Message activity between the Add Transaction Log Fields and Delete Transaction Log Fields activities, nothing will happen. However, if you include a Log Message activity in between, it will display the data from the Transaction Log Fields added using the Add Transaction Log Fields activity.

Hope it helps!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.