logError: format syntax error differently

The stack of a syntax error shows the importing module, not the
imported one, so the information of which line has the error is
lost.
Also, syntax errors are definitely programmer errors, and should
be criticals rather than warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=722285