Jump to content

Recommended Posts

Posted

I have a log file for sent emails. The log file is structured as follows:
2025-11-24 18:00:37     guest      /contact/      Email request sent

Is it possible to display this log in the backend on a separate page and perhaps even as a diagram?
Or is there a module for this?
I would be grateful for any advice!

Posted

If you didn't want to build your own Process module then this sounds like something that @diogo's ProcessAdminCustomPages would be suitable for. Once you'd created a template you could just grab the log entries and loop through them to output them in a table or something fancier.

In a similar vein, @kongondo's RuntimeMarkup field can be use to show that kind of info on an editable page. I sometimes have a tab on a page template that just lists log type data in a tab so that an editor can see it.

  • Like 1
Posted (edited)

Thank you very much!
It was really quite easy with ProcessAdminCustomPages and a foreach loop!

$logentries = $log->getEntries("my-email-log", ["limit"=>"20"]);
echo "<ul>";
foreach ($logentries as $logentry) {
echo "<li>";
	echo $logentry["user"];
	echo " <br> ";
	echo $logentry["date"];
	echo " <br> ";
	echo $logentry["url"];
	echo " <br> ";
	echo $logentry["text"];
echo "</li>";
}
echo "</ul>";

With chart.js, I was even able to implement a diagram.

Edited by tires

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...