Manual:$wgDebugLogGroups

Details
Set to an array of log group keys to filenames. If set, wfDebugLog output for that group will go to that file instead of the regular. Useful for enabling selective logging in production.

Example
This example logs debug messages of group "ConfirmEditExtension" to "ext_confirmedit.log" and those of groups "FCKeditor" and "FCKeditorExtension" to "ext_fckeditor.log".