Manual:$wgDebugLogFile

Details
The file name of the debug log, or empty if disabled.

  appends to this file.

It is also used for structured logging, when a message goes to a channel that is not otherwise configured.