[log] $WINDOW should be last because it could contain %

Thanks to @NuclearW for spotting