Allow for a custom item prefix in the log

Created on 15 April 2024, 7 months ago
Updated 2 July 2024, 5 months ago

Problem/Motivation

Currently, all logs key the items to be processed as "item_".

As a way to quickly scan the items in a log to reinforce to the developer (and anyone else) the type of content being acted on, it would be beneficial to be able to set a custom prefix.

In the example TestDo10Things.php, the output begins

item_1: Knock knock. Who's there? banana.
item_2: Knock knock. Who's there? banana.
item_3: Knock knock. Who's there? banana.

Especially when the keys and values do not clearly identify the type of content, it would be helpful to prefix items with something meaningful, such a joke_ in the case of the above example.

Steps to reproduce

  1. Run the TestDo10Things.php code

Proposed resolution

I am going to lean on @swirt's suggestion in this comment on my related issue:
https://www.drupal.org/project/codit_batch_operations/issues/3440588#com... πŸ› Remove extra "item_" prefix when using getNidsOfType() Fixed

Remaining tasks

Implement the suggestion above.

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States skyriter

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024