I have my log files name in the form Status.<network_name>.log (that is, for status window).
For the first status window, $window(status window).logfile does not work, note that if I close this status window (which is the main one when mIRC starts), my second status window becomes the first one, but $window(status window).logfile works fine.

7.42 beta1

#mircscripting @ irc.swiftirc.net == the best mIRC help channel