At first glance, this sounds like it should be easy to add. However, it's not quite so clear-cut. For example:
Do you mean that you would like /aline -g to log to a window's log file only if it has logging already turned on? This is the easiest case and would work without any issues.
If you would like it to log to a window that does not have logging turned on, would you expect /aline -g to enclose every line that it adds to the log file with a "Session Start" and "Session Close"? This would seem excessive but without this, it would break the expected format of the log file.
Would you expect it to use the logging timestamp format? Or use a similar -tN switch to /echo?
You also state that you want /aline -g to log to a "specified" file. Do you mean you want to specify a custom filename with /aline that is not related to a window? A filename is not part of the command format, since /aline was designed to work with @windows, so -g would need to extend the command format to include a filename.
If logging to a custom filename, would you expect it to enclose each line with "Session Start" and "Session Close"? Or would you like mIRC to remember that it wrote to a log file, write "Session Start" at the start of the logging session, and only when mIRC exits (which may be days or weeks depending on how long you keep mIRC open), write "Session End" and close the file? In this case, mIRC would need to store a history of potentially thousands of filenames (for every call to /aline -g that uses a different filename).
And so on.