Log mysql procedures

Create a table called logtable with two columns, id INT and log VARCHAR(255).

Make the id column autoincrement.

Use this procedure:

Put this code anywhere you want to log a message to the table.

call log_msg(concat(‘myvar is: ‘, myvar, ‘ and myvar2 is: ‘, myvar2));
It’s a nice quick and dirty little logger to figure out what is going on.

 

thx to https://stackoverflow.com/questions/273437/how-do-you-debug-mysql-stored-procedures

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *