Add log4js config setting

Fixes #916. Supersedes #1016.