It's actually a mysql setting. You'll need to edit the mysql configuration file, and you're looking for a line that has log-slow-queries. It's probably commented out. You can uncomment it and then any queries longer than the designated threshold will be logged to the specified file.

Are you running any other database driven software besides the forum?