So I've created a web portal for a client so they could upload a file which triggers a Feed Me feed (on that file). I handle the upload and triggering of the feed with a custom Module. I trigger the feed using the php exec function and the feed's Direct Feed URL. I would love to show the user the log for the Feed's task while it's running, so they would know if any errors occur. Is there a way to do this?
1 Answer
I would look to the feed-me plugin itself:
The controller: https://github.com/craftcms/feed-me/blob/develop/src/controllers/LogsController.php
Which calls the service: https://github.com/craftcms/feed-me/blob/3a8246c055240c46ae9307f3ccada3c42d296920/src/services/Logs.php#L71
Essentially it just reads the log file and presents it to a template, so you could use JS/AJAX to return the results every x seconds.