core/apiRouter: only log JSON or XML output in debug mode