diff --git a/synapse/handlers/identity.py b/synapse/handlers/identity.py
index 77f133be8faa4f8c5fdfadce164f3c41351851bd..656ce124f94f7058c34728cf02a92d8507a70f72 100644
--- a/synapse/handlers/identity.py
+++ b/synapse/handlers/identity.py
@@ -65,7 +65,8 @@ class IdentityHandler(BaseHandler):
                     "Trusting untrustworthy ID server %r even though it isn't"
                     " in the trusted id list for testing because"
                     " 'use_insecure_ssl_client_just_for_testing_do_not_use'"
-                    " is set in the config"
+                    " is set in the config",
+                    id_server,
                 )
             else:
                 logger.warn('%s is not a trusted ID server: rejecting 3pid ' +