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 /synmark/__init__.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 'synmark/__init__.py')
-rw-r--r-- | synmark/__init__.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/synmark/__init__.py b/synmark/__init__.py index 09bc7e7927..3d4ec3e184 100644 --- a/synmark/__init__.py +++ b/synmark/__init__.py @@ -21,45 +21,6 @@ except ImportError: from twisted.internet.pollreactor import PollReactor as Reactor from twisted.internet.main import installReactor -from synapse.config.homeserver import HomeServerConfig -from synapse.util import Clock - -from tests.utils import default_config, setup_test_homeserver - - -async def make_homeserver(reactor, config=None): - """ - Make a Homeserver suitable for running benchmarks against. - - Args: - reactor: A Twisted reactor to run under. - config: A HomeServerConfig to use, or None. - """ - cleanup_tasks = [] - clock = Clock(reactor) - - if not config: - config = default_config("test") - - config_obj = HomeServerConfig() - config_obj.parse_config_dict(config, "", "") - - hs = setup_test_homeserver( - cleanup_tasks.append, config=config_obj, reactor=reactor, clock=clock - ) - stor = hs.get_datastore() - - # Run the database background updates. - if hasattr(stor.db_pool.updates, "do_next_background_update"): - while not await stor.db_pool.updates.has_completed_background_updates(): - await stor.db_pool.updates.do_next_background_update(1) - - def cleanup(): - for i in cleanup_tasks: - i() - - return hs, clock.sleep, cleanup - def make_reactor(): """ |