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.
Well, for example; If I have logging turned off for that @custom_window, and I select to turn it on via right clicking the window on the switch bar and going to the logging sub-menu, it will open up a window for me to save a file (which, would be the specified file.)
The "Session Start" and "Session Close" is something I would of expected to do, yes. Since that's how it does in normal channel windows. Referring to "Session Start" when the window opens and "Session Close" when I happen to exit out of mIRC, or close the window.
As for timestamps, I would expect, or prefer it to use my logging timestamp format. However, a -tN would be nice as an option.
The 'specified file' was referencing to the file explorer that would pop-up and ask me to save a file, for example "@Custom_Window.log", (meaning I don't want to specify a filename on the /aline -g)
EDIT: If logging is turned off for the @Custom_Window, I don't think it should log at all to it , until, turned back on.
I hope this is more detailed than my original post.