How to get line number of error that .htaccess apache2 is reporting in /var/logs/error.log

Unfortunately, as far as I can tell, there is no way to get the "line number" on which the syntax error occurs to be reported in the Apache error log.

Ordinarily, you can increase the verbosity of logged messages by increasing the LogLevel in the server config. However, even increasing it to LogLevel trace8 (the "max") does not provide any more information with regards to "syntax" errors - which are reported as a core:alert, not by the actual module.

I've accounted for redirects with spaces by using the escape back slash and this had worked in previous testing.

This may actually be the problem... you can't backslash-escape spaces in the mod_alias Redirect (and RedirectMatch) directive(s) and attempting to do so could well result in the error you are seeing. (Maybe in your "previous testing" you were using a mod_rewrite RewriteRule directive?) For example, the following will result in the aforementioned error:

# ERROR: "Redirect takes one, two or three arguments, an optional status, then doc..."
Redirect 302 /foo\ bar /baz

If the URL argument contains spaces then surround the whole argument in double quotes instead:

# OK
Redirect 302 "/foo bar" /baz

This works with most modules/directives and is often preferable to backslash-escapes since it is usually more readable.

Aside: If, for instance, you were to combine this with what looks like a backslash-escape, ie. "/foo\ bar", then it will match a literal backslash (followed by a space)! (However, in order to actually match a literal backslash - that is encoded as part of the HTTP request - AllowEncodedSlashes On needs to be set in the server config, otherwise Apache will generate a 404.)

Another common cause of such errors are the use of line-end comments (which are not supported by Apache). For example:

# ERROR: "Redirect takes one, two or three arguments, an optional status, then doc..."
Redirect 302 /foo /bar  # Comment