mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-17 13:54:22 -05:00
Include the configured log level in phone home stats. (#8477)
By reporting the log level of the synapse logger as a string.
This commit is contained in:
parent
ae5b2a72c0
commit
8dbf62fada
1
changelog.d/8477.misc
Normal file
1
changelog.d/8477.misc
Normal file
@ -0,0 +1 @@
|
||||
Include the log level in the phone home stats.
|
@ -113,6 +113,13 @@ async def phone_stats_home(hs, stats, stats_process=_stats_process):
|
||||
stats["database_engine"] = hs.get_datastore().db_pool.engine.module.__name__
|
||||
stats["database_server_version"] = hs.get_datastore().db_pool.engine.server_version
|
||||
|
||||
#
|
||||
# Logging configuration
|
||||
#
|
||||
synapse_logger = logging.getLogger("synapse")
|
||||
log_level = synapse_logger.getEffectiveLevel()
|
||||
stats["log_level"] = logging.getLevelName(log_level)
|
||||
|
||||
logger.info("Reporting stats to %s: %s" % (hs.config.report_stats_endpoint, stats))
|
||||
try:
|
||||
await hs.get_proxied_http_client().put_json(
|
||||
|
Loading…
Reference in New Issue
Block a user