Very similar to other languages, your best bet is simply to leverage it, writing to log tables mariadb via insert statements.  I do this to mark at what point events have passed each day, and then overall how long they took and if they completed.  That is monitored by an external system reading those tables, of course.

HTH

On Tue, Dec 19, 2023 at 4:29 PM Eliezer Croitoru via discuss <discuss@lists.mariadb.org> wrote:
Hey Everyone,

I am currently using MariaDB 10.5.x from almalinux 9.3 and am testing latest 10.11 on Debian 12.
I recently encountered an issue on 10.5 which probably didn’t run the stored procedure it should have.
I have verified that the DB is configured properly ie:
SET GLOBAL event_scheduler = ON;

And also in the cnf files is default to ON and after a restart of the service the scheduler is on.

I want to create a way to debug the stored procedure and the event scheduler.
When I program a software I can log messages into somewhere but I don’t know how to do that in MariaDB and
I would like to get a recommendation on how to do that this kind of logging in the when the even
is being triggered and also after the call to the stored procedure ends.
With this I can start to see if the event is being triggered and when.
I am using it to cleanup a table and only leave the last 2 hours of data but it won’t run
for at-least couple month now so I am calling the stored procedure from a cronjob.

Thanks for any advice,
Eliezer

_______________________________________________
discuss mailing list -- discuss@lists.mariadb.org
To unsubscribe send an email to discuss-leave@lists.mariadb.org