)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8025d2a4512398814cfe22a8d5ba7e4282c95483","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"13c16e11_6f889e0b","updated":"2024-11-27 19:00:40.000000000","message":"rebased on some new test assertions that show why patchset 1 wasn\u0027t correct","commit_id":"76db0cdb25e5d2c99680ee9abcb422b24c5de160"}],"swift/common/utils/__init__.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d6aef95ccac1611a7f9c7c923776ea030c7d51fe","unresolved":true,"context_lines":[{"line_number":310,"context_line":"    conf \u003d conf or {}"},{"line_number":311,"context_line":"    swift_logger \u003d get_swift_logger("},{"line_number":312,"context_line":"        conf, name, log_to_console, log_route, fmt)"},{"line_number":313,"context_line":"    name \u003d swift_logger.name if name is None else name"},{"line_number":314,"context_line":"    tail_prefix \u003d name if statsd_tail_prefix is None else statsd_tail_prefix"},{"line_number":315,"context_line":"    statsd_client \u003d get_statsd_client(conf, tail_prefix, swift_logger.logger)"},{"line_number":316,"context_line":"    swift_logger.logger.statsd_client \u003d statsd_client"}],"source_content_type":"text/x-python","patch_set":1,"id":"512a9ad6_11bb5e5e","line":313,"range":{"start_line":313,"start_character":4,"end_line":313,"end_character":28},"updated":"2024-11-27 18:58:38.000000000","message":"this is only correct (i.e. true to the backward compatible mess) if ``log_route`` is not given to get_logger.\n\nIt\u0027s *so* confused: ``logging.Logger.name`` is set to ``log_route``, but ``log_route`` defaults to ``name`` (which is how the current tests pass with your change). But ``statsd_tail_prefix`` has always defaulted to ``name``, which is not necessarily ``logger.name``.\n\nTo add to the confusion, ``name`` ends up being ``SwiftLogAdapter.server``.\n\nIIRC a long time ago I wrote what is now test.unit.common.utils.test_logs.TestUtilsLogs.test_get_swift_logger_name_and_route to unpick this mayhem.\n\nI *did* consider the approach you have taken here, but decided to go with the explicit wording ... because it\u0027s explicit 😊 vs \"go figure out WTF get_swift_logger might be doing\".\n\nI think this works:\n```\nname \u003d swift_logger.server if name is None else name\n```\n\nbut TBH I think I prefer the explicit rather than relying on the weirdness of get_logger not ever changing (I know, it shouldn\u0027t ever change because of backwards compatible etc.)","commit_id":"c834aa3dce51e932807987ca9561068fd4aa0950"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8025d2a4512398814cfe22a8d5ba7e4282c95483","unresolved":true,"context_lines":[{"line_number":310,"context_line":"    conf \u003d conf or {}"},{"line_number":311,"context_line":"    swift_logger \u003d get_swift_logger("},{"line_number":312,"context_line":"        conf, name, log_to_console, log_route, fmt)"},{"line_number":313,"context_line":"    name \u003d swift_logger.server"},{"line_number":314,"context_line":"    tail_prefix \u003d name if statsd_tail_prefix is None else statsd_tail_prefix"},{"line_number":315,"context_line":"    statsd_client \u003d get_statsd_client(conf, tail_prefix, swift_logger.logger)"},{"line_number":316,"context_line":"    swift_logger.logger.statsd_client \u003d statsd_client"}],"source_content_type":"text/x-python","patch_set":3,"id":"48a1cf60_5a8a9227","line":313,"updated":"2024-11-27 19:00:40.000000000","message":"I *think* this will pass tests, but IDK if I prefer it :shrug:","commit_id":"76db0cdb25e5d2c99680ee9abcb422b24c5de160"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"240ecf6f32896d6922772d86d5e4553738ffbe2c","unresolved":false,"context_lines":[{"line_number":310,"context_line":"    conf \u003d conf or {}"},{"line_number":311,"context_line":"    swift_logger \u003d get_swift_logger("},{"line_number":312,"context_line":"        conf, name, log_to_console, log_route, fmt)"},{"line_number":313,"context_line":"    name \u003d swift_logger.server"},{"line_number":314,"context_line":"    tail_prefix \u003d name if statsd_tail_prefix is None else statsd_tail_prefix"},{"line_number":315,"context_line":"    statsd_client \u003d get_statsd_client(conf, tail_prefix, swift_logger.logger)"},{"line_number":316,"context_line":"    swift_logger.logger.statsd_client \u003d statsd_client"}],"source_content_type":"text/x-python","patch_set":3,"id":"51c19762_dce86148","line":313,"in_reply_to":"48a1cf60_5a8a9227","updated":"2025-01-07 15:06:48.000000000","message":"Acknowledged","commit_id":"76db0cdb25e5d2c99680ee9abcb422b24c5de160"}],"test/unit/common/test_utils.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d6aef95ccac1611a7f9c7c923776ea030c7d51fe","unresolved":true,"context_lines":[{"line_number":7648,"context_line":"        self.assertEqual(fake_statsd_client.get_increments(), [\u0027foo\u0027])"},{"line_number":7649,"context_line":""},{"line_number":7650,"context_line":"        # kill and maim!"},{"line_number":7651,"context_line":"        adapted_logger.statsd_client_source.statsd_client \u003d None"},{"line_number":7652,"context_line":"        # bro, what are you DOING!?  you\u0027re crazy!?"},{"line_number":7653,"context_line":"        self.assertEqual(adapted_logger.logger.statsd_client, None)"},{"line_number":7654,"context_line":"        # too late, your mutilated logger\u0027s stats are broken"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba50458d_8732b88c","line":7651,"updated":"2024-11-27 18:58:38.000000000","message":"ok so this is not quite as brutal as test_patch_statsd_methods_client_deleted_from_source\n\nwe could make it blow up by removing the guard\n```\nif getattr(statsd_client_source, \u0027statsd_client\u0027):\n```\n\nor see it as a \"feature\" that one way to switch off stats is to set the client to None !?","commit_id":"c834aa3dce51e932807987ca9561068fd4aa0950"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"240ecf6f32896d6922772d86d5e4553738ffbe2c","unresolved":false,"context_lines":[{"line_number":7648,"context_line":"        self.assertEqual(fake_statsd_client.get_increments(), [\u0027foo\u0027])"},{"line_number":7649,"context_line":""},{"line_number":7650,"context_line":"        # kill and maim!"},{"line_number":7651,"context_line":"        adapted_logger.statsd_client_source.statsd_client \u003d None"},{"line_number":7652,"context_line":"        # bro, what are you DOING!?  you\u0027re crazy!?"},{"line_number":7653,"context_line":"        self.assertEqual(adapted_logger.logger.statsd_client, None)"},{"line_number":7654,"context_line":"        # too late, your mutilated logger\u0027s stats are broken"}],"source_content_type":"text/x-python","patch_set":1,"id":"bae4bc15_0b3f3ff3","line":7651,"in_reply_to":"4b550b39_9a75243f","updated":"2025-01-07 15:06:48.000000000","message":"Done","commit_id":"c834aa3dce51e932807987ca9561068fd4aa0950"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1ba15e70039e29831e3bf9469cdbf120b294d1d1","unresolved":true,"context_lines":[{"line_number":7648,"context_line":"        self.assertEqual(fake_statsd_client.get_increments(), [\u0027foo\u0027])"},{"line_number":7649,"context_line":""},{"line_number":7650,"context_line":"        # kill and maim!"},{"line_number":7651,"context_line":"        adapted_logger.statsd_client_source.statsd_client \u003d None"},{"line_number":7652,"context_line":"        # bro, what are you DOING!?  you\u0027re crazy!?"},{"line_number":7653,"context_line":"        self.assertEqual(adapted_logger.logger.statsd_client, None)"},{"line_number":7654,"context_line":"        # too late, your mutilated logger\u0027s stats are broken"}],"source_content_type":"text/x-python","patch_set":1,"id":"4b550b39_9a75243f","line":7651,"in_reply_to":"ba50458d_8732b88c","updated":"2024-11-27 19:04:32.000000000","message":"OIC, now I\u0027ve got to the next patch I see that\u0027s where you\u0027ve gone 😊\nhttps://review.opendev.org/c/openstack/swift/+/936388","commit_id":"c834aa3dce51e932807987ca9561068fd4aa0950"}]}
