diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-10-29 07:27:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-29 07:27:37 -0400 |
commit | 00b24aa545091395f9a92d531836f6bf7b4460e0 (patch) | |
tree | 10d7333f2d1d9aaa0a6888c9ce3afb7d6feebf58 /tests/server.py | |
parent | Don't require hiredis to run unit tests (#8680) (diff) | |
download | synapse-00b24aa545091395f9a92d531836f6bf7b4460e0.tar.xz |
Support generating structured logs in addition to standard logs. (#8607)
This modifies the configuration of structured logging to be usable from the standard Python logging configuration. This also separates the formatting of logs from the transport allowing JSON logs to files or standard logs to sockets.
Diffstat (limited to '')
-rw-r--r-- | tests/server.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/server.py b/tests/server.py index ea9c22bc51..b97003fa5a 100644 --- a/tests/server.py +++ b/tests/server.py @@ -571,12 +571,10 @@ def connect_client(reactor: IReactorTCP, client_id: int) -> AccumulatingProtocol reactor factory: The connecting factory to build. """ - factory = reactor.tcpClients[client_id][2] + factory = reactor.tcpClients.pop(client_id)[2] client = factory.buildProtocol(None) server = AccumulatingProtocol() server.makeConnection(FakeTransport(client, reactor)) client.makeConnection(FakeTransport(server, reactor)) - reactor.tcpClients.pop(client_id) - return client, server |