Write to the WordPress debug.log or the file of your choice.