)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"7efedbd417183dccd3e35f831ccc2cbdba74d338","unresolved":true,"context_lines":[{"line_number":7,"context_line":"HybridMultiObjectDispatcher"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- Move multi object logging to a dispatcher"},{"line_number":10,"context_line":"- Get logger with statsd proxy"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I408ddb69e7f9122905c66b94b6b63ba9628eb4d9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"606bb85b_ef846cab","line":10,"updated":"2024-05-15 16:02:01.000000000","message":"I think it would be worth having some discussion of the reasons behind this change. e.g. get_logger already returns a logger with a statsd proxy, so where is this change heading.","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4b0ce629e546c5d589c103c11336480d3c155303","unresolved":false,"context_lines":[{"line_number":7,"context_line":"HybridMultiObjectDispatcher"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- Move multi object logging to a dispatcher"},{"line_number":10,"context_line":"- Get logger with statsd proxy"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I408ddb69e7f9122905c66b94b6b63ba9628eb4d9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"4c7e8164_d7942330","line":10,"in_reply_to":"606bb85b_ef846cab","updated":"2024-06-03 23:54:41.000000000","message":"Yep, we can discuss this in the next meeting.","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5e14195bda557ed6293fcb114ac5b31bfd7b6882","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Shreeya Deshpande \u003cshreeyad@nvidia.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-06-07 09:11:20 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"HybridMultiObjectDispatcher / LoggerStatsdFascade"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- Move multi object logging to a dispatcher"},{"line_number":10,"context_line":"- Get logger with statsd proxy"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"4b59cd3e_2d6ae6fc","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":27},"updated":"2024-06-07 20:17:07.000000000","message":"No longer a thing, right? In general, we probably ought to work on a better commit message for this one.","commit_id":"8c31651474f513236065a699da52f7a5a3da1dde"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4a6f5f4651df64772f0db2993f6dfcab3f425698","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Shreeya Deshpande \u003cshreeyad@nvidia.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-06-07 09:11:20 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"HybridMultiObjectDispatcher / LoggerStatsdFascade"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- Move multi object logging to a dispatcher"},{"line_number":10,"context_line":"- Get logger with statsd proxy"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"66221b95_f9a209af","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":27},"in_reply_to":"4b59cd3e_2d6ae6fc","updated":"2024-06-07 22:37:55.000000000","message":"Agree, we\u0027ve been calling this as a \u0027Dispatcher Patch\u0027 for so long lol. I\u0027ll remove the first part of the commit message!","commit_id":"8c31651474f513236065a699da52f7a5a3da1dde"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b983484f8cc77afdf19eb03881b0e25fcae3af2e","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- Move multi object logging to a dispatcher function"},{"line_number":10,"context_line":"- Get a logger with statsd proxy"},{"line_number":11,"context_line":"- def get_logger \u003d old(get_logger)withoutstatsdclient + statsd_logger"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Co-author: Shreeya Deshpande \u003cshreeyad@nvidia.com\u003e"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"9045c870_773b67ef","line":11,"updated":"2024-08-27 22:19:12.000000000","message":"Oh, and we\u0027ll want a better commit message. Maybe something along the lines of\n```\nSplit statsd client from logger\n\nThere\u0027s no reason Swift\u0027s statsd client and adapted logger should be so\ntied together. Split them apart, but provide a shim to maintain\ncompatibility for third parties that use swift.common.utils.get_logger\n\nNew code should expect to get separated clients using\nswift.common.utils.logs.get_adapted_logger and\nswift.common.statsd_client.get_statsd_client\n```","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"c0f2da970fc99d4518b2f67375e79a85b4eec160","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- Move multi object logging to a dispatcher function"},{"line_number":10,"context_line":"- Get a logger with statsd proxy"},{"line_number":11,"context_line":"- def get_logger \u003d old(get_logger)withoutstatsdclient + statsd_logger"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Co-author: Shreeya Deshpande \u003cshreeyad@nvidia.com\u003e"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"a53a5174_84e2e352","line":11,"in_reply_to":"9045c870_773b67ef","updated":"2024-08-28 15:54:02.000000000","message":"Acknowledged","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"94ba6197988861b3d78e634b05a38cb43d7ad7ba","unresolved":true,"context_lines":[{"line_number":17,"context_line":"Remove PrefixLoggerAdapter and SwiftLoggerAdapter"},{"line_number":18,"context_line":"SwiftLogAdapter is now Swift\u0027s LogAdapter"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Co-author: Shreeya Deshpande \u003cshreeyad@nvidia.com\u003e"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I408ddb69e7f9122905c66b94b6b63ba9628eb4d9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":42,"id":"b194aac9_45efa5a9","line":20,"updated":"2024-09-24 17:12:25.000000000","message":"I think the recognised tag is ``Co-Authored-By``\n\nI do see instances of Co-Author in git log from years ago, but I\u0027d suggest using ``Co-Authored-By`` since that\u0027s what seems to be in vogue.","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"6bb9e05a640f06482e771f1236a2e5f0b81ee7e9","unresolved":false,"context_lines":[{"line_number":17,"context_line":"Remove PrefixLoggerAdapter and SwiftLoggerAdapter"},{"line_number":18,"context_line":"SwiftLogAdapter is now Swift\u0027s LogAdapter"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Co-author: Shreeya Deshpande \u003cshreeyad@nvidia.com\u003e"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I408ddb69e7f9122905c66b94b6b63ba9628eb4d9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":42,"id":"3fe5847d_78ea6f1f","line":20,"in_reply_to":"b194aac9_45efa5a9","updated":"2024-09-26 18:29:22.000000000","message":"Acknowledged","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9e674a1d916c0be484530e53f6d3e8fdb0aa0ef9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"74d925a5_68d115f8","updated":"2024-04-15 13:07:52.000000000","message":"py2 test failure needs to be looked at:\n\n\t\u003e       return \u0027\u0027.join(map(quoter, s))\n\tE       KeyError: u\u0027\\xe9\u0027\n\n\t/usr/lib/python2.7/urllib.py:1300: KeyError\n\n\n... there\u0027s a \"quote\" function in utils wraps stdlib - we should use that instead.","commit_id":"bbf7b645234ce3e006b8e9611bdcac77a719941c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"964d3e11_006cf0db","updated":"2024-05-02 19:13:15.000000000","message":"this is in merge conflict and I don\u0027t think it works\n\nI think to some extent you could separte the introduction of the get_statsd_client helper function from the improvement to replace the current utils.logs.LogAdapter mess with a HybridMultiDispatchObject ...\n\n... maybe it would help to try and get the StatsdClientConfig object stuff merged and THEN do the HybridMultiDispatchObject get_logger shim thing...","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"526ae3f20f26f813a4111112b52ffca67cfb5588","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"7ad25e87_ceaf1890","updated":"2024-05-08 22:10:38.000000000","message":"Pushing a temp commit. Not ready for review","commit_id":"c3dd5c05aae156e57b7c32de6362fb49aeeea0db"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"301e649831002fcdb2f2e2ce7c543853598aaa58","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"fbeec8aa_44d836e8","updated":"2024-05-13 22:30:38.000000000","message":"Will move the testing part out of test_statsd in the next iteration. Would it look better in t/u/o/test_reconstructor.py?","commit_id":"c3dd5c05aae156e57b7c32de6362fb49aeeea0db"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9bb01056ef419b1eba7bce17a0ece788e1c2586d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"10986f0e_82b2c81c","updated":"2024-05-15 23:39:30.000000000","message":"Given the single use-case we\u0027ve got, I\u0027m not sure I love how the order of args impacts attribute resolution. For example, given\n```\nhybrid1 \u003d HybridMultiObjectDispatcher(logger, stats)\nhybrid2 \u003d HybridMultiObjectDispatcher(stats, logger)\n```\n`hybrid1.logger` gets you `logger.logger`, while `hybrid2.logger` gets you `stats.logger` -- [both](https://github.com/python/cpython/blob/v3.12.3/Lib/logging/__init__.py#L1895) of [which](https://github.com/openstack/swift/blob/2.33.0/swift/common/utils/__init__.py#L1375) are valid things someone might go digging for. In fact, [we do that already](https://github.com/openstack/swift/blob/master/swift/common/middleware/crypto/kmip_keymaster.py#L125-L127) in running code, and we do it a *ton* in tests.\n\nAnd because we\u0027ve tried to generalize it, when you *know* which one you want, you have to do something like `logger.objs[0].logger` and hope we don\u0027t change the order later...","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"7efedbd417183dccd3e35f831ccc2cbdba74d338","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"febed7dd_e01f4b2a","updated":"2024-05-15 16:02:01.000000000","message":"Is this still a WIP patch?\n\nIIUC there is one use case for this which is to provide a single object that dispatches to a logger or a StatsdClient. And the motivation is that we cannot re-plumb all the code to pass separate references to logger and StatsdClient.\n\nThe dynamic approach (which is how I think of this) has the advantage of not needing updating when new attributes are added to the logger or StatsdClient, but its disadvantage are the lack of a defined interface (what can I call on a dispatcher? why does my IDE never auto-complete, grrr?) and an (unknown) overhead on every attribute access.\n\nThe static (current) approach is less flexible. In its current form it\u0027s also IMHO harder to maintain because the patching of logger is done separately from StatsdClient. We could fix that. The advantage it has is that the patched \u0027wrapper\u0027 class has a defined interface.\n\nA third approach might be to use multiple inheritance to combine StatsdClient with a logger.\n\nA fourth approach is to simply use the statsd_client attribute of the adapted logger when necessary:\n\n```\n   self.statsd \u003d self.logger.statsd_client\n   self.statsd.new_method()\n```\n\n\nprobe tests need updating:\n\n```\ntest/probe/test_reconstructor_revert.py:404:\n2024-05-14 00:20:01.987650 | centos-9-stream | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n2024-05-14 00:20:01.987664 | centos-9-stream | test/probe/common.py:599: in run_custom_daemon\n2024-05-14 00:20:01.987678 | centos-9-stream |     with capture_logger(conf, conf.get(\u0027log_name\u0027, conf_section),\n2024-05-14 00:20:01.987692 | centos-9-stream | /usr/lib64/python3.9/contextlib.py:119: in __enter__\n2024-05-14 00:20:01.987706 | centos-9-stream |     return next(self.gen)\n2024-05-14 00:20:01.987720 | centos-9-stream | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n2024-05-14 00:20:01.987734 | centos-9-stream |\n2024-05-14 00:20:01.987748 | centos-9-stream | conf \u003d {\u0027__file__\u0027: \u0027/etc/swift/object-server/4.conf\u0027, \u0027bind_ip\u0027: \u0027127.0.0.4\u0027, \u0027bind_port\u0027: \u00276240\u0027, \u0027commit_window\u0027: \u00270\u0027, ...}\n2024-05-14 00:20:01.987762 | centos-9-stream | args \u003d (\u0027object-reconstructor\u0027,)\n2024-05-14 00:20:01.987777 | centos-9-stream | kwargs \u003d {\u0027log_route\u0027: \u0027object-reconstructor\u0027, \u0027log_to_console\u0027: False}\n2024-05-14 00:20:01.987791 | centos-9-stream |\n2024-05-14 00:20:01.987805 | centos-9-stream |     @contextlib.contextmanager\n2024-05-14 00:20:01.987818 | centos-9-stream |     def capture_logger(conf, *args, **kwargs):\n2024-05-14 00:20:01.987833 | centos-9-stream |         \"\"\"\n2024-05-14 00:20:01.987847 | centos-9-stream |         Yields an adapted system logger based on the conf options. The log adapter\n2024-05-14 00:20:01.987861 | centos-9-stream |         captures logs in order to support the pattern of tests calling the log\n2024-05-14 00:20:01.987875 | centos-9-stream |         accessor methods (e.g. get_lines_for_level) directly on the logger\n2024-05-14 00:20:01.987888 | centos-9-stream |         instance.\n2024-05-14 00:20:01.987902 | centos-9-stream |         \"\"\"\n2024-05-14 00:20:01.987917 | centos-9-stream |         with mock.patch(\u0027swift.common.utils.logs.LogAdapter\u0027, CaptureLogAdapter):\n2024-05-14 00:20:01.987930 | centos-9-stream | \u003e           log_adapter \u003d utils.logs.get_logger(conf, *args, **kwargs)\n2024-05-14 00:20:01.987944 | centos-9-stream | E           AttributeError: module \u0027swift.common.utils.logs\u0027 has no attribute \u0027get_logger\u0027\n2024-05-14 00:20:01.987972 | centos-9-stream |\n2024-05-14 00:20:01.987990 | centos-9-stream | test/debug_logger.py:316: AttributeError\n```","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"76a1adead4dffc836e4ffaa2ad497bd51703fdb8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"39a63864_391a6995","updated":"2024-05-16 17:16:05.000000000","message":"We\u0027re debating all the different ways that we could write this hybrid-facade interface and the *goal* is actually to get the statsd references out of our new logs module.\n\nLet\u0027s not get *too* bogged down assuming the goal is to get the implementation of the backwards compat interface \"perfect\" - the goal is to make forward progress on keeping our new logs/statsd_client modules clean and tidy so we can begin the process of re-instrumenting all of swift with labelled metrics in a maintainable way.\n\nWe can *mostly* ignore this patch once we get a function in logs that returns a real logger to go along with our new function in statsd_client that will returns a real stats object.\n\nI don\u0027t see how we get the statsd methods out of logs until we have *something* to shim them back together in common.utils - to me it doesn\u0027t matter that much *what*\n\nWe might *need* the shim for awhile because we can\u0027t fix all of swift at once, but we don\u0027t need to merge it until we happy.  Our primary motivation is to get some early feedbck from SRE on labelled metrics.  If that means our first implementation of proxy-logging instrumenation needs to call `self.logger.increment(\u0027metric\u0027, **lables)` instead of `self.stats.increment(\u0027metric\u0027, **labels)` (for the time being) maybe that\u0027s acceptable and we can leave the statsd methods in logs for a little while longer.","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"073024cf59f6da559aaf8ab68512eec491072a55","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"afdf66a9_df8a70a9","updated":"2024-05-15 17:50:34.000000000","message":"a prototype test:\n\n```\n    def test_multi_thing(self):\n        class A(object):\n            def __init__(self):\n                self.a \u003d \u0027a\u0027\n                self.x \u003d \u0027x\u0027\n\n            def do(self):\n                return self.x\n\n        wrapped \u003d A()\n        thing \u003d HybridMultiObjectDispatcher(wrapped)\n        self.assertEqual(\u0027a\u0027, thing.a)\n        self.assertEqual(\u0027x\u0027, thing.do())\n        with self.assertRaises(AttributeError):\n            thing.b\n\n        # verify dynamic nature...\n        wrapped.a \u003d \u0027updated\u0027\n        self.assertEqual(\u0027updated\u0027, thing.a)\n        with mock.patch.object(wrapped, \u0027do\u0027, return_value\u003d\u0027mocked\u0027):\n            self.assertEqual(\u0027mocked\u0027, thing.do())\n\n```","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"7c146d0049d456d34b5250f994cb9cb6c2288915","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"0c61820d_64204c60","updated":"2024-05-15 02:23:15.000000000","message":"recheck","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"9267720323df2f9cc43cbe1cc4b161e8c7376520","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"05c4da1e_e53e341b","updated":"2024-06-05 20:14:42.000000000","message":"r","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"fb8a29a5d3df53f0d4df77de35ae8f7231fc2628","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"c00c4858_6b7c1b4e","updated":"2024-06-05 22:22:54.000000000","message":"recheck","commit_id":"753c0fb6af01e6254feee1256967a6c8b2afa8da"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d176127c0bf84e927b9d630b3b0e6bd2e04e1f6d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"27d0a52b_a4336b33","updated":"2024-06-06 20:52:03.000000000","message":"recheck","commit_id":"0e2bbc47298ef03f17c200f26c6c443e6df5fcaf"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"b99bc1402d5b97de04da11e6a447cec9aacd7a1a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"4aae65bd_d7c46081","updated":"2024-06-06 21:53:13.000000000","message":"recheck","commit_id":"5e17e9dff5945987371ac7fc6d6013c3c14692f8"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"42c581ee0891049bb6dbf3837c527060de07a5d7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"955b9f93_7a61b4be","updated":"2024-06-10 16:02:14.000000000","message":"recheck","commit_id":"12430729fae6829e865e7ceaf2e07b5fd6348fa4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"15a22f76ac178c309b2b9a766a465c5d34333ec3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"122898bc_651aa48d","updated":"2024-06-12 15:44:56.000000000","message":"Do all/any of the following patches in the chain depend on this change? Or is this change in parallel to the labelled metrics topic?","commit_id":"8cc58dd803339ed73e962c090a65c96af1dad71a"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"9f961f9917a4b80298fa8e1ea876342c98dc754b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"938d5d00_58e3873b","updated":"2024-06-25 22:50:16.000000000","message":"recheck","commit_id":"f345e559c93e561eb80cb21fdcea7c2e93249b9f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fad901b50827fe18736c41012a1f66d41fc63e24","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":27,"id":"4f5d942d_18b8e997","updated":"2024-08-26 17:23:13.000000000","message":"Still need to check in on what the test changes look like, but this seems to be getting really close!\n\nThe churn in proxy-logging, s3api, tempauth, and proxy/server are all smells, though -- the fact that *we* have to change things means 3rd parties (including our own 3rd party auth middlewares!) will, too, or get `TypeError`s on upgrade.","commit_id":"f43faeaff14e88b81013f2408f7a39ea1f190f9c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78a119bda2e432ff1d140c33f5f6375ec16f2172","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"6ef7ca1f_d1f0972c","updated":"2024-08-28 19:54:32.000000000","message":"asked for feed back on the get_statsd_client signature - I don\u0027t think there\u0027s any obligration to keep it consistent with get_logger signature\n\nI\u0027m most interested in the best interface we can imagine for the new function rather than being beholden to a legacy of trade offs that we\u0027re trying to dig oursevles out of.\n\nSince we\u0027re trying to move towards labeled statsd metrics we could name it \"legacy_tail_prefix\" - or just bury it in the conf dict without enshrining it in the function signature.","commit_id":"75a85e159af0204003087c92afb4fb6c939c30cd"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d920ca2e915ff46c05bf77ff1eeacdeeaa08cf5c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":31,"id":"5a7a66cd_8fa765f5","updated":"2024-08-30 16:00:34.000000000","message":"recheck","commit_id":"96210ab226944d93ba3d752af532bdb5e4c359cb"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"ca185e484f3c640b91b5c88330add99dd0d394ad","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":33,"id":"f9ae68a2_9bc21dbb","updated":"2024-09-11 04:11:55.000000000","message":"Not necessarily a blocker. More of a question inline about the new `get_adapted_logger` function name.\n\nMaybe this has all been discussed before, and if so I applogise. Happy to be told \u0027shut up Matt :P\u0027","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f9a63cc25d0c4acfad10027cff5145a3ffb0378f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":33,"id":"d1f393b9_878fac45","updated":"2024-09-11 12:23:10.000000000","message":"The ``get_logger()`` isn\u0027t backwards compatible - its the same signature but returns a facade object that has different attributes vs master. Many of the changes are a consequence of this. That\u0027s unfortunate for at least two reasons:\n\n1. any third party using logger\u003dget_logger() may have to change their code where they access logger.logger, in which case we may as well force them to use the new pattern\n2. this patch has to modify a bunch of tests because we haven\u0027t yet adopted the new pattern - once we do adopt it those tests need to change again anyway.\n\nCan we make the facade backwards compatible? Probably. I played with one change that helps but is not sufficient https://paste.openstack.org/show/bu5ADfmaPv3ZiFy5YrOH/ i.e. make it that ``LoggerStatsdFacade.logger`` will return the ``logger`` attribute of the \"wrapped\" LogAdapter rather then the LogAdapter itself. This is equivalent to calling``logger.logger`` on master where logger is an instance of the LogAdapter.\n\nBut we\u0027d also need to make ``LoggerStatsdFacade.logger.statsd_client`` be a thing again.\n\nI know we all hated the delegate methods pattern, but given that this is about providing something just for backwards compatibility, I wonder if we should just stick with it for the sake of preserving the behaviors rather than writing new code that has to emulate it just for backwards compatibility?","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e4423839129427459f8851b2bc3ed58f09aa6390","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":37,"id":"dc6f1263_0ecc0a81","updated":"2024-09-17 18:03:58.000000000","message":"The failing tests in test_reconstructor.py and test_replicator.py are something to do with how the prefixed logger is constructed, the ``set_prefix`` method etc. I\u0027ve not managed to work out how to fix it, will continue tomorrow.\n\nTwo of the failing tests can be fixed simply, see inline comments","commit_id":"44c983f8f67710ac815554edd35ab6fd0d708144"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"371d43e55eb849a0d0a3934f03357d737953902a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":38,"id":"6cadb448_4f862e52","updated":"2024-09-18 12:36:40.000000000","message":"I managed to get all tests to pass, but I\u0027m thinking we might avoid get_prefixed_logger() altogether rather than fix it.","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"25e6bf85ce3fb88b8abdfb2b6ac1d40662af5a44","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":40,"id":"723d59be_0eaa4272","updated":"2024-09-23 15:24:24.000000000","message":"maybe the slots check and white list for statsd methods is ok for \"dynamic\" get/set/del attr.  But it\u0027s a strange mix of dnynamism:  Facade is trying really hard to pretend to be an \"is-a\" logger (with extra methods) even tho it\u0027s really a \"has-a\" logger (and also other stuff that it uses for the extra methods).\n\nAlternatively, I think it would be reasonable to just create a class that exposes/names every method that\u0027s part of the Facade interface:  info, debug, exception, increment, decrement, transaction_id, thread_locals, etc\n\nEach method/property would be very short but clearly exposes where it\u0027s routed - there\u0027s no ambiguity or chance of the Facade interface to unexpectedly grow in scope/usage.  I also think it\u0027s be slightly faster for the interpreter and we make lots of debug \u0026 increment calls.\n\nI don\u0027t think anything should change in reconstructor except that the PrefixAdapter is no longer needed since SwiftLogAdapter can support setting a prefix post fork natively.  The reconstructor test failures are probably related to the swap out of self.logger.increemnt and self.statds.increment - which I don\u0027t think should be part of this change.","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"94ba6197988861b3d78e634b05a38cb43d7ad7ba","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":42,"id":"4ee6dff4_34eb4ec4","updated":"2024-09-24 17:12:25.000000000","message":"I ran out of time today. The issue I raised in test_statsd_client needs some careful thought. It has reminded me that on master we are deliberately sharing the same StatsdClient for all LogAdapter constructed with the same log_route (because they all wrap the same logging.Logger instance). This patch is changing that which could have unintended consequences for metric prefix naming.","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a3a37fa36504001bf9e6cfe48ed0c681a3c4885f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":42,"id":"daee6982_713b64cb","updated":"2024-09-25 15:58:20.000000000","message":"in our pursuit to avoid test churn (a nobel goal!) I don\u0027t want to loose side of what the Facade should be doing (providing an interface that\u0027s compatible with how our code uses the objects returned by get_logger, as oppsed to how our *tests* might have \"spelled\" things when making assertions) - otherwise we end up with the tail wagging the dog.\n\nI think the statsd_client prefix manipulation was always a kind of \"bug\" no matter how much we might have relied on it (if at all?  on purpose?!) and we should think carefully about how we maintain/re-implement that bug so it\u0027s obvious what it\u0027s doing is CRAZY.\n\nWhen the facade has to be crazy let\u0027s try to make it explicitly so - I don\u0027t think there\u0027s an \"elegent\" way to achive what we\u0027re trying to do.  I\u0027m nervous about having such a \"transparent\" implementation of __setattr__ and __delattr__ on the facade; I don\u0027t think anyone should be using the objects returned by get_logger that way outside of tests.  When tests are doing stuff like mocking and they hit the facade object we want to *explicitly* acknowledge the change in the test by having them mock/patch/annotate/manipulate the *correct* object (either facade.swift_logger or facade.statsd) so that we KNOW the test is still achieving the assertion of the behavior we actually want.  It may be easier to do this with a few warts on the Facade that we eventually beat out of the object with some targeted test churn after we have something that works.","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"7a307d4ab4b0ad9ef91c4d870b3a039d0750dfa8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":43,"id":"246c8db9_bac0b8d8","updated":"2024-09-26 16:56:08.000000000","message":"recheck","commit_id":"184c5ab789088ee0c618cbbdb0caa10eeeb42ac8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"fca9ec8d6734d516d63f0627028d18f48e85e972","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":45,"id":"27111fc4_fde40aae","updated":"2024-09-30 18:08:05.000000000","message":"Please consider breaking the PrefixLogAdapter (and SwiftLoggerAdapter\u003d\u003eSwiftLogAdapter) change into a pre-factor\n\nPlease continue to beat out all the unecessary test churn.","commit_id":"528b24489517a01fb924cd989c7a6617f7a7a858"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"22c0c8bda8cc4d848ffd140a5f7e018cd01f0f10","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":52,"id":"60433626_7106d25d","updated":"2024-10-28 18:43:55.000000000","message":"recheck","commit_id":"14b20edb9c66f006ae629d6007164a6cef8183d6"}],"swift/cli/relinker.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"fca9ec8d6734d516d63f0627028d18f48e85e972","unresolved":true,"context_lines":[{"line_number":659,"context_line":""},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"def parallel_process(do_cleanup, conf, logger\u003dNone, device_list\u003dNone):"},{"line_number":662,"context_line":"    logger \u003d logger or logging.getLogger()"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"    # initialise recon dump for collection"},{"line_number":665,"context_line":"    # Lets start by always deleting last run\u0027s stats"}],"source_content_type":"text/x-python","patch_set":42,"id":"b07f281a_b0754bf6","line":662,"updated":"2024-09-30 18:08:05.000000000","message":"this is silly; we have a conf - why not `logger or utils.get_logger(conf)`","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d4599d5a72512155a8c56c5471b43f7105f6fa0b","unresolved":true,"context_lines":[{"line_number":659,"context_line":""},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"def parallel_process(do_cleanup, conf, logger\u003dNone, device_list\u003dNone):"},{"line_number":662,"context_line":"    logger \u003d logger or logging.getLogger()"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"    # initialise recon dump for collection"},{"line_number":665,"context_line":"    # Lets start by always deleting last run\u0027s stats"}],"source_content_type":"text/x-python","patch_set":42,"id":"6efa98fa_c8c38cff","line":662,"in_reply_to":"b07f281a_b0754bf6","updated":"2024-10-01 14:16:34.000000000","message":"Along with this, many places (about 25) have logging.getLogger(). Is there a reason for that? Maybe we can go back to utils.get_logger(conf) everywhere!","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"94ba6197988861b3d78e634b05a38cb43d7ad7ba","unresolved":true,"context_lines":[{"line_number":689,"context_line":"    for worker_devs in distribute_evenly(device_list, workers):"},{"line_number":690,"context_line":"        pid \u003d os.fork()"},{"line_number":691,"context_line":"        if pid \u003d\u003d 0:"},{"line_number":692,"context_line":"            dev_logger \u003d SwiftLogAdapter(logger, {})"},{"line_number":693,"context_line":"            dev_logger.set_prefix(\u0027[pid\u003d%s, devs\u003d%s] \u0027 % ("},{"line_number":694,"context_line":"                os.getpid(), \u0027,\u0027.join(worker_devs)))"},{"line_number":695,"context_line":"            os._exit(Relinker("}],"source_content_type":"text/x-python","patch_set":42,"id":"eb159b69_293325fd","line":692,"updated":"2024-09-24 17:12:25.000000000","message":"this shouldn\u0027t be necessary, assuming that logger is already a SwiftLogAdapter...did some tests fail without this?","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"6bb9e05a640f06482e771f1236a2e5f0b81ee7e9","unresolved":false,"context_lines":[{"line_number":689,"context_line":"    for worker_devs in distribute_evenly(device_list, workers):"},{"line_number":690,"context_line":"        pid \u003d os.fork()"},{"line_number":691,"context_line":"        if pid \u003d\u003d 0:"},{"line_number":692,"context_line":"            dev_logger \u003d SwiftLogAdapter(logger, {})"},{"line_number":693,"context_line":"            dev_logger.set_prefix(\u0027[pid\u003d%s, devs\u003d%s] \u0027 % ("},{"line_number":694,"context_line":"                os.getpid(), \u0027,\u0027.join(worker_devs)))"},{"line_number":695,"context_line":"            os._exit(Relinker("}],"source_content_type":"text/x-python","patch_set":42,"id":"c5a20c86_6022dfb7","line":692,"in_reply_to":"7ea002a6_dd311cda","updated":"2024-09-26 18:29:22.000000000","message":"Done","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"48236fbac3b8bcf6c79874284013d17f50792120","unresolved":true,"context_lines":[{"line_number":689,"context_line":"    for worker_devs in distribute_evenly(device_list, workers):"},{"line_number":690,"context_line":"        pid \u003d os.fork()"},{"line_number":691,"context_line":"        if pid \u003d\u003d 0:"},{"line_number":692,"context_line":"            dev_logger \u003d SwiftLogAdapter(logger, {})"},{"line_number":693,"context_line":"            dev_logger.set_prefix(\u0027[pid\u003d%s, devs\u003d%s] \u0027 % ("},{"line_number":694,"context_line":"                os.getpid(), \u0027,\u0027.join(worker_devs)))"},{"line_number":695,"context_line":"            os._exit(Relinker("}],"source_content_type":"text/x-python","patch_set":42,"id":"7ea002a6_dd311cda","line":692,"in_reply_to":"eb159b69_293325fd","updated":"2024-09-26 13:26:42.000000000","message":"logger here is not SwiiftLogAdapter.\nlogger is \u003cRootLogger root (WARNING)\u003e\n\n\nAttributeError: \u0027RootLogger\u0027 object has no attribute \u0027set_prefix\u0027\n../../swift/cli/relinker.py:693: AttributeError","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"}],"swift/common/middleware/crypto/kmip_keymaster.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"387075012855054d0b86ef693856d024aedde11a","unresolved":true,"context_lines":[{"line_number":123,"context_line":"        # Make sure we\u0027ve got the kmip log handler set up before"},{"line_number":124,"context_line":"        # we instantiate a client"},{"line_number":125,"context_line":"        kmip_logger \u003d logging.getLogger(\u0027kmip\u0027)"},{"line_number":126,"context_line":"        for handler in self.logger.logger.logger.handlers:"},{"line_number":127,"context_line":"            kmip_logger.addHandler(handler)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        debug_filter \u003d LogLevelFilter(logging.DEBUG)"}],"source_content_type":"text/x-python","patch_set":14,"id":"715cc366_b8889921","line":126,"updated":"2024-06-04 00:46:01.000000000","message":"Ugh, man -- makes me think we ought to have at least one of our logger layers include something like\n\n```\n@property\ndef handlers(self):\n    return self.logger.handlers\n```","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"9267720323df2f9cc43cbe1cc4b161e8c7376520","unresolved":true,"context_lines":[{"line_number":123,"context_line":"        # Make sure we\u0027ve got the kmip log handler set up before"},{"line_number":124,"context_line":"        # we instantiate a client"},{"line_number":125,"context_line":"        kmip_logger \u003d logging.getLogger(\u0027kmip\u0027)"},{"line_number":126,"context_line":"        for handler in self.logger.logger.logger.handlers:"},{"line_number":127,"context_line":"            kmip_logger.addHandler(handler)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        debug_filter \u003d LogLevelFilter(logging.DEBUG)"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba20d76b_176e0ac7","line":126,"in_reply_to":"715cc366_b8889921","updated":"2024-06-05 20:14:42.000000000","message":"Should we have that in this patch?","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4a6f5f4651df64772f0db2993f6dfcab3f425698","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        # Make sure we\u0027ve got the kmip log handler set up before"},{"line_number":124,"context_line":"        # we instantiate a client"},{"line_number":125,"context_line":"        kmip_logger \u003d logging.getLogger(\u0027kmip\u0027)"},{"line_number":126,"context_line":"        for handler in self.logger.logger.logger.handlers:"},{"line_number":127,"context_line":"            kmip_logger.addHandler(handler)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        debug_filter \u003d LogLevelFilter(logging.DEBUG)"}],"source_content_type":"text/x-python","patch_set":14,"id":"8c0f80d7_03985333","line":126,"in_reply_to":"ba20d76b_176e0ac7","updated":"2024-06-07 22:37:55.000000000","message":"Resolving in followup patch","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"ca185e484f3c640b91b5c88330add99dd0d394ad","unresolved":true,"context_lines":[{"line_number":123,"context_line":"        # Make sure we\u0027ve got the kmip log handler set up before"},{"line_number":124,"context_line":"        # we instantiate a client"},{"line_number":125,"context_line":"        kmip_logger \u003d logging.getLogger(\u0027kmip\u0027)"},{"line_number":126,"context_line":"        for handler in self.logger.logger.logger.handlers:"},{"line_number":127,"context_line":"            kmip_logger.addHandler(handler)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        debug_filter \u003d LogLevelFilter(logging.DEBUG)"}],"source_content_type":"text/x-python","patch_set":33,"id":"a334e2f4_0f2324fd","line":126,"updated":"2024-09-11 04:11:55.000000000","message":"Lol, so now we\u0027re deeper into the logger now. It\u0027s like it\u0027s loggers all the way down","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"3abed308b51252b413169f97693b298704c411ea","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        # Make sure we\u0027ve got the kmip log handler set up before"},{"line_number":124,"context_line":"        # we instantiate a client"},{"line_number":125,"context_line":"        kmip_logger \u003d logging.getLogger(\u0027kmip\u0027)"},{"line_number":126,"context_line":"        for handler in self.logger.logger.logger.handlers:"},{"line_number":127,"context_line":"            kmip_logger.addHandler(handler)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        debug_filter \u003d LogLevelFilter(logging.DEBUG)"}],"source_content_type":"text/x-python","patch_set":33,"id":"7267fb7f_3d5165b5","line":126,"in_reply_to":"25e5960b_97d95860","updated":"2024-09-17 19:09:38.000000000","message":"Making this patch backwards compatible in upcoming patches, making this comment done","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f9a63cc25d0c4acfad10027cff5145a3ffb0378f","unresolved":true,"context_lines":[{"line_number":123,"context_line":"        # Make sure we\u0027ve got the kmip log handler set up before"},{"line_number":124,"context_line":"        # we instantiate a client"},{"line_number":125,"context_line":"        kmip_logger \u003d logging.getLogger(\u0027kmip\u0027)"},{"line_number":126,"context_line":"        for handler in self.logger.logger.logger.handlers:"},{"line_number":127,"context_line":"            kmip_logger.addHandler(handler)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        debug_filter \u003d LogLevelFilter(logging.DEBUG)"}],"source_content_type":"text/x-python","patch_set":33,"id":"25e5960b_97d95860","line":126,"in_reply_to":"a334e2f4_0f2324fd","updated":"2024-09-11 12:23:10.000000000","message":"this (and other changes) is making think that the \"backwards compatible\" facade isn\u0027t backwards compatible. Yes, we\u0027re maintaining the same ``get_logger`` method to get a hybrid thing, but it\u0027s properties are different. So any third party may have to change their code anyway as a result of this change, in which case we could just force them to adopt the new pattern?","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"}],"swift/common/middleware/tempauth.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f9a63cc25d0c4acfad10027cff5145a3ffb0378f","unresolved":true,"context_lines":[{"line_number":215,"context_line":"        self.reseller_prefixes, self.account_rules \u003d \\"},{"line_number":216,"context_line":"            config_read_reseller_options(conf, dict(require_group\u003d\u0027\u0027))"},{"line_number":217,"context_line":"        self.reseller_prefix \u003d self.reseller_prefixes[0]"},{"line_number":218,"context_line":"        tail_prefix \u003d \u0027tempauth.%s\u0027 % ("},{"line_number":219,"context_line":"            self.reseller_prefix if self.reseller_prefix else \u0027NONE\u0027,)"},{"line_number":220,"context_line":"        self.logger \u003d get_logger(conf, log_route\u003d\u0027tempauth\u0027,"},{"line_number":221,"context_line":"                                 statsd_tail_prefix\u003dtail_prefix)"}],"source_content_type":"text/x-python","patch_set":33,"id":"30657338_01d3e87b","line":218,"updated":"2024-09-11 12:23:10.000000000","message":"this doesn\u0027t seem like a necessary or related change","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"f39485ce50fd147a787f80b07de87c25e00b4c61","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        self.reseller_prefixes, self.account_rules \u003d \\"},{"line_number":216,"context_line":"            config_read_reseller_options(conf, dict(require_group\u003d\u0027\u0027))"},{"line_number":217,"context_line":"        self.reseller_prefix \u003d self.reseller_prefixes[0]"},{"line_number":218,"context_line":"        tail_prefix \u003d \u0027tempauth.%s\u0027 % ("},{"line_number":219,"context_line":"            self.reseller_prefix if self.reseller_prefix else \u0027NONE\u0027,)"},{"line_number":220,"context_line":"        self.logger \u003d get_logger(conf, log_route\u003d\u0027tempauth\u0027,"},{"line_number":221,"context_line":"                                 statsd_tail_prefix\u003dtail_prefix)"}],"source_content_type":"text/x-python","patch_set":33,"id":"fe945c47_c0a56665","line":218,"in_reply_to":"30657338_01d3e87b","updated":"2024-09-11 14:01:02.000000000","message":"I was looking forward to reverting that change in one of the revisions where it seemed related but I confirmed last week that change is no longer necessary. I will fix it in the next revision.","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"}],"swift/common/statsd_client.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class StatsdClient(object):"},{"line_number":28,"context_line":"    def __init__(self, host, port, base_prefix\u003d\u0027\u0027, tail_prefix\u003d\u0027\u0027,"},{"line_number":29,"context_line":"                 default_sample_rate\u003d1, sample_rate_factor\u003d1, logger\u003dNone):"},{"line_number":30,"context_line":"        self._host \u003d host"},{"line_number":31,"context_line":"        self._port \u003d port"},{"line_number":32,"context_line":"        self._base_prefix \u003d base_prefix"}],"source_content_type":"text/x-python","patch_set":6,"id":"b92011f9_5f528c2e","side":"PARENT","line":29,"updated":"2024-05-02 19:13:15.000000000","message":"ok, so statsdclient\u0027s also always have a reference to the logger that\u0027s holding on to them; it\u0027s no wonder garbage collection circular reference counting is such a hard problem.","commit_id":"348d19142eb144fd5aaae99db08bda27391abec8"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"6b1b46e6cdf0885d74878e75664114e80de3ec5d","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class StatsdClient(object):"},{"line_number":28,"context_line":"    def __init__(self, host, port, base_prefix\u003d\u0027\u0027, tail_prefix\u003d\u0027\u0027,"},{"line_number":29,"context_line":"                 default_sample_rate\u003d1, sample_rate_factor\u003d1, logger\u003dNone):"},{"line_number":30,"context_line":"        self._host \u003d host"},{"line_number":31,"context_line":"        self._port \u003d port"},{"line_number":32,"context_line":"        self._base_prefix \u003d base_prefix"}],"source_content_type":"text/x-python","patch_set":6,"id":"c6ef750b_a3f7a0e7","side":"PARENT","line":29,"in_reply_to":"b92011f9_5f528c2e","updated":"2024-05-07 20:18:42.000000000","message":"Acknowledged","commit_id":"348d19142eb144fd5aaae99db08bda27391abec8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":41,"context_line":"    :return: an instance of ``StatsdClient``, or None if ``log_statsd_host``"},{"line_number":42,"context_line":"             is not specified in ``conf``"},{"line_number":43,"context_line":"    \"\"\""},{"line_number":44,"context_line":"    statsd_host \u003d conf.get(\u0027log_statsd_host\u0027)"},{"line_number":45,"context_line":"    statsd_client \u003d None"},{"line_number":46,"context_line":"    if statsd_host:"},{"line_number":47,"context_line":"        statsd_client \u003d StatsdClient("}],"source_content_type":"text/x-python","patch_set":6,"id":"b3908fb7_0fcef4ee","line":44,"updated":"2024-05-02 19:13:15.000000000","message":"something about the duplication of this and L57 bugs me","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ed9c95505b7a3d793654ecc8617060c8d244b6a3","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    :return: an instance of ``StatsdClient``, or None if ``log_statsd_host``"},{"line_number":42,"context_line":"             is not specified in ``conf``"},{"line_number":43,"context_line":"    \"\"\""},{"line_number":44,"context_line":"    statsd_host \u003d conf.get(\u0027log_statsd_host\u0027)"},{"line_number":45,"context_line":"    statsd_client \u003d None"},{"line_number":46,"context_line":"    if statsd_host:"},{"line_number":47,"context_line":"        statsd_client \u003d StatsdClient("}],"source_content_type":"text/x-python","patch_set":6,"id":"d546a562_a62d8a52","line":44,"in_reply_to":"b3908fb7_0fcef4ee","updated":"2024-05-29 19:21:39.000000000","message":"Done","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":46,"context_line":"    if statsd_host:"},{"line_number":47,"context_line":"        statsd_client \u003d StatsdClient("},{"line_number":48,"context_line":"            conf,"},{"line_number":49,"context_line":"            tail_prefix\u003dtail_prefix, logger\u003dlogger)"},{"line_number":50,"context_line":"    return statsd_client"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"dd8afac8_a137148f","line":49,"updated":"2024-05-02 19:13:15.000000000","message":"this might look better as a try/except?  We could return None on NoStatsdHostError","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"1ec3bd9742496b066db22aa85fa2c225fd2dd5d9","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    if statsd_host:"},{"line_number":47,"context_line":"        statsd_client \u003d StatsdClient("},{"line_number":48,"context_line":"            conf,"},{"line_number":49,"context_line":"            tail_prefix\u003dtail_prefix, logger\u003dlogger)"},{"line_number":50,"context_line":"    return statsd_client"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"016e3416_338e263a","line":49,"in_reply_to":"dd8afac8_a137148f","updated":"2024-05-08 16:58:03.000000000","message":"Acknowledged","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":54,"context_line":"    def __init__(self, conf\u003dNone, tail_prefix\u003d\u0027\u0027):"},{"line_number":55,"context_line":"        conf \u003d conf if conf else {}"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        self.host \u003d conf.get(\u0027log_statsd_host\u0027)"},{"line_number":58,"context_line":"        self.port \u003d int(conf.get(\u0027log_statsd_port\u0027, 8125))"},{"line_number":59,"context_line":"        self.base_prefix \u003d conf.get(\u0027log_statsd_metric_prefix\u0027, \u0027\u0027)"},{"line_number":60,"context_line":"        self.default_sample_rate \u003d float(conf.get("}],"source_content_type":"text/x-python","patch_set":6,"id":"cd15a2e6_2db3cca4","line":57,"updated":"2024-05-02 19:13:15.000000000","message":"maybe this should NoStatsdHostError if None?","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"1ec3bd9742496b066db22aa85fa2c225fd2dd5d9","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    def __init__(self, conf\u003dNone, tail_prefix\u003d\u0027\u0027):"},{"line_number":55,"context_line":"        conf \u003d conf if conf else {}"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        self.host \u003d conf.get(\u0027log_statsd_host\u0027)"},{"line_number":58,"context_line":"        self.port \u003d int(conf.get(\u0027log_statsd_port\u0027, 8125))"},{"line_number":59,"context_line":"        self.base_prefix \u003d conf.get(\u0027log_statsd_metric_prefix\u0027, \u0027\u0027)"},{"line_number":60,"context_line":"        self.default_sample_rate \u003d float(conf.get("}],"source_content_type":"text/x-python","patch_set":6,"id":"bd24a254_a061c37a","line":57,"in_reply_to":"cd15a2e6_2db3cca4","updated":"2024-05-08 16:58:03.000000000","message":"Acknowledged","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4fd5bf86ceac8042a8dc49a385a66e740e08d9a9","unresolved":true,"context_lines":[{"line_number":50,"context_line":"                tail_prefix\u003dtail_prefix, logger\u003dlogger)"},{"line_number":51,"context_line":"        return statsd_client"},{"line_number":52,"context_line":"    except:"},{"line_number":53,"context_line":"        raise \"NoStatsdHostError\""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"class StatsdClientConf(object):"}],"source_content_type":"text/x-python","patch_set":8,"id":"8690752a_be64b8df","line":53,"updated":"2024-05-08 16:35:59.000000000","message":"I don\u0027t think this is going to work:\n```\n\u003e\u003e\u003e raise \"NoStatsdHostError\"\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nTypeError: exceptions must derive from BaseException\n```\nI take it we meant to define a `NoStatsdHostError` exception and raise *that*?\n\nThough I\u0027m not sure *why* we\u0027d want to raise an exception; the behavior in the docstring (return either a StatsdClient or None) seems perfectly reasonable.","commit_id":"3681cf2315de5327f699942aa47be9899fab3955"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"1ec3bd9742496b066db22aa85fa2c225fd2dd5d9","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                tail_prefix\u003dtail_prefix, logger\u003dlogger)"},{"line_number":51,"context_line":"        return statsd_client"},{"line_number":52,"context_line":"    except:"},{"line_number":53,"context_line":"        raise \"NoStatsdHostError\""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"class StatsdClientConf(object):"}],"source_content_type":"text/x-python","patch_set":8,"id":"6a0282b9_3583924e","line":53,"in_reply_to":"8690752a_be64b8df","updated":"2024-05-08 16:58:03.000000000","message":"Yes, I was getting on defining that. But StatsdClient or None return sounds good!","commit_id":"3681cf2315de5327f699942aa47be9899fab3955"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"cc54773dcdf66bf60281481bed7cdf9d461b3fb7","unresolved":true,"context_lines":[{"line_number":24,"context_line":"import six"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_statsd_client(conf\u003dNone, statsd_tail_prefix\u003d\u0027\u0027,"},{"line_number":28,"context_line":"                      logger\u003dNone):"},{"line_number":29,"context_line":"    \"\"\""},{"line_number":30,"context_line":"    Get an instance of StatsdClient using config settings."}],"source_content_type":"text/x-python","patch_set":28,"id":"0d3a87d2_3fac92e6","line":27,"updated":"2024-08-27 18:55:39.000000000","message":"I was fine with this signature -- though we *could* change it if we really want, since the `get_statsd_client` API hasn\u0027t even been around for a release yet, so we don\u0027t expect anyone to really depend on it.\n\nThe `get_logger` API, though... that\u0027s been around a while.","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4b5fd3e2bdd312c32f73bd498394113d1cd5f475","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import six"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_statsd_client(conf\u003dNone, statsd_tail_prefix\u003d\u0027\u0027,"},{"line_number":28,"context_line":"                      logger\u003dNone):"},{"line_number":29,"context_line":"    \"\"\""},{"line_number":30,"context_line":"    Get an instance of StatsdClient using config settings."}],"source_content_type":"text/x-python","patch_set":28,"id":"73c3deb3_6ddefaed","line":27,"in_reply_to":"09d85ee6_9cecc271","updated":"2024-08-29 18:33:29.000000000","message":"Acknowledged","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"c0f2da970fc99d4518b2f67375e79a85b4eec160","unresolved":true,"context_lines":[{"line_number":24,"context_line":"import six"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_statsd_client(conf\u003dNone, statsd_tail_prefix\u003d\u0027\u0027,"},{"line_number":28,"context_line":"                      logger\u003dNone):"},{"line_number":29,"context_line":"    \"\"\""},{"line_number":30,"context_line":"    Get an instance of StatsdClient using config settings."}],"source_content_type":"text/x-python","patch_set":28,"id":"a3675f44_0815d5c6","line":27,"in_reply_to":"0d3a87d2_3fac92e6","updated":"2024-08-28 15:54:02.000000000","message":"Just thought of keeping definitions consistent. Is statsd_tail_prefix preferred over tail_prefix for def get_statsd_client?","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b05dc9a6aeec207683fa30cab7feccab4fdee534","unresolved":true,"context_lines":[{"line_number":24,"context_line":"import six"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_statsd_client(conf\u003dNone, statsd_tail_prefix\u003d\u0027\u0027,"},{"line_number":28,"context_line":"                      logger\u003dNone):"},{"line_number":29,"context_line":"    \"\"\""},{"line_number":30,"context_line":"    Get an instance of StatsdClient using config settings."}],"source_content_type":"text/x-python","patch_set":28,"id":"e3847781_7acfffa9","line":27,"in_reply_to":"a3675f44_0815d5c6","updated":"2024-08-28 16:04:30.000000000","message":"I was thinking it could just be `tail_prefix`, since the `statsd`-ness is implied from the function name. Maybe worth getting second opinions, though?","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78a119bda2e432ff1d140c33f5f6375ec16f2172","unresolved":true,"context_lines":[{"line_number":24,"context_line":"import six"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_statsd_client(conf\u003dNone, statsd_tail_prefix\u003d\u0027\u0027,"},{"line_number":28,"context_line":"                      logger\u003dNone):"},{"line_number":29,"context_line":"    \"\"\""},{"line_number":30,"context_line":"    Get an instance of StatsdClient using config settings."}],"source_content_type":"text/x-python","patch_set":28,"id":"09d85ee6_9cecc271","line":27,"in_reply_to":"e3847781_7acfffa9","updated":"2024-08-28 19:54:32.000000000","message":"that would also match the class argument signature - why would we change it?","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f9a63cc25d0c4acfad10027cff5145a3ffb0378f","unresolved":true,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_statsd_client(conf\u003dNone, tail_prefix\u003d\u0027\u0027,"},{"line_number":28,"context_line":"                      logger\u003dNone, log_route\u003dNone):"},{"line_number":29,"context_line":"    \"\"\""},{"line_number":30,"context_line":"    Get an instance of StatsdClient using config settings."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"7f4a81fd_850bdb6a","line":28,"range":{"start_line":28,"start_character":35,"end_line":28,"end_character":49},"updated":"2024-09-11 12:23:10.000000000","message":"I\u0027m curious why this arg needed to be added - it\u0027s not used","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"f39485ce50fd147a787f80b07de87c25e00b4c61","unresolved":true,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_statsd_client(conf\u003dNone, tail_prefix\u003d\u0027\u0027,"},{"line_number":28,"context_line":"                      logger\u003dNone, log_route\u003dNone):"},{"line_number":29,"context_line":"    \"\"\""},{"line_number":30,"context_line":"    Get an instance of StatsdClient using config settings."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"cdeaeabb_9f498eea","line":28,"range":{"start_line":28,"start_character":35,"end_line":28,"end_character":49},"in_reply_to":"7f4a81fd_850bdb6a","updated":"2024-09-11 14:01:02.000000000","message":"While checking backward compatibility, multiple tests fail when called get_statsd_client\u0027s logger instead of get_logger\u0027s. Example:\nIn reconstructor.py,\n\nself.logger \u003d get_prefixed_logger(\n            logger or get_statsd_client(conf, log_route\u003d\u0027object-reconstructor\u0027), {})\n        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)\n        \n\n\nFAILED obj/test_reconstructor.py::TestReconstructFragmentArchive::test_quarantine_age_conf - TypeError: get_statsd_client() got an unexpected keyword argument \u0027log_route\u0027\nFAILED obj/test_reconstructor.py::TestReconstructFragmentArchive::test_quarantine_threshold_conf - TypeError: get_statsd_client() got an unexpected keyword argument \u0027log_route\u0027\nFAILED obj/test_reconstructor.py::TestReconstructFragmentArchive::test_request_node_count_conf - TypeError: get_statsd_client() got an unexpected keyword argument \u0027log_route\u0027\nFAILED obj/test_reconstructor.py::TestReconstructFragmentArchiveUTF8::test_quarantine_age_conf - TypeError: get_statsd_client() got an unexpected keyword argument \u0027log_route\u0027\nFAILED obj/test_reconstructor.py::TestReconstructFragmentArchiveUTF8::test_quarantine_threshold_conf - TypeError: get_statsd_client() got an unexpected keyword argument \u0027log_route\u0027\nFAILED obj/test_reconstructor.py::TestReconstructFragmentArchiveUTF8::test_request_node_count_conf - TypeError: get_statsd_client() got an unexpected keyword argument \u0027log_route\u0027\nFAILED obj/test_reconstructor.py::TestReconstructFragmentArchiveECDuplicationFactor::test_quarantine_age_conf - TypeError: get_statsd_client() got an unexpected keyword argument \u0027log_route\u0027\nFAILED obj/test_reconstructor.py::TestReconstructFragmentArchiveECDuplicationFactor::test_quarantine_threshold_conf - TypeError: get_statsd_client() got an unexpected keyword argument \u0027log_route\u0027\nFAILED obj/test_reconstructor.py::TestReconstructFragmentArchiveECDuplicationFactor::test_request_node_count_conf - TypeError: get_statsd_client() got an unexpected keyword argument \u0027log_route\n\n\nHence, I added a parameter log_route to get_statsd_client.","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"3abed308b51252b413169f97693b298704c411ea","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_statsd_client(conf\u003dNone, tail_prefix\u003d\u0027\u0027,"},{"line_number":28,"context_line":"                      logger\u003dNone, log_route\u003dNone):"},{"line_number":29,"context_line":"    \"\"\""},{"line_number":30,"context_line":"    Get an instance of StatsdClient using config settings."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"cd5460a2_85e78883","line":28,"range":{"start_line":28,"start_character":35,"end_line":28,"end_character":49},"in_reply_to":"cdeaeabb_9f498eea","updated":"2024-09-17 19:09:38.000000000","message":"Done","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"94ba6197988861b3d78e634b05a38cb43d7ad7ba","unresolved":true,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_statsd_client(conf\u003dNone, tail_prefix\u003d\u0027\u0027,"},{"line_number":28,"context_line":"                      logger\u003dNone, log_route\u003dNone):"},{"line_number":29,"context_line":"    \"\"\""},{"line_number":30,"context_line":"    Get an instance of StatsdClient using config settings."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"6a07cf2d_71103ae5","line":28,"updated":"2024-09-24 17:12:25.000000000","message":"I still don\u0027t understand this change. We should fix any test that requires it.","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"48236fbac3b8bcf6c79874284013d17f50792120","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def get_statsd_client(conf\u003dNone, tail_prefix\u003d\u0027\u0027,"},{"line_number":28,"context_line":"                      logger\u003dNone, log_route\u003dNone):"},{"line_number":29,"context_line":"    \"\"\""},{"line_number":30,"context_line":"    Get an instance of StatsdClient using config settings."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"503a5560_27bae8d6","line":28,"in_reply_to":"6a07cf2d_71103ae5","updated":"2024-09-26 13:26:42.000000000","message":"Acknowledged","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"}],"swift/common/utils/__init__.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb5a2b7ee08b9b19c5f8445f15074c4c030b6d99","unresolved":true,"context_lines":[{"line_number":205,"context_line":"DEFAULT_DRAIN_LIMIT \u003d 65536"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"# aliasing for backwards compatibility"},{"line_number":208,"context_line":"get_logger \u003d get_adapted_logger"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"class InvalidHashPathConfigError(ValueError):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3310de7a_f2cd59c3","line":208,"updated":"2024-05-15 18:00:52.000000000","message":"this isn\u0027t right, `utils.get_logger` should be a NEW function that uses `logs.get_adapted_logger` to get a logger-like (without any statsd interfaces) and `statsd_client.get_statsd_client` to get a `StatsdClient` instance.\n\nThen the NEW `utils.get_logger` function should return an instance of the new class composed of the objects it gets from `logs.get_adpated_logger` and `statsd_client.get_statsd_client`\n\n    HybridDispatcher(logger, statsd_client)\n    \nIn this way all references to statsd_client should be removed from `utils.logs` while still maintaining the existing interface of `utils.get_logger`","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"054d1fde17e13a9824e9319c72a05b94b4bccdc2","unresolved":false,"context_lines":[{"line_number":205,"context_line":"DEFAULT_DRAIN_LIMIT \u003d 65536"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"# aliasing for backwards compatibility"},{"line_number":208,"context_line":"get_logger \u003d get_adapted_logger"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"class InvalidHashPathConfigError(ValueError):"}],"source_content_type":"text/x-python","patch_set":10,"id":"b98707b8_937909cc","line":208,"in_reply_to":"3310de7a_f2cd59c3","updated":"2024-05-29 19:23:29.000000000","message":"Acknowledged","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"7efedbd417183dccd3e35f831ccc2cbdba74d338","unresolved":true,"context_lines":[{"line_number":215,"context_line":"            \"swift_hash_path_prefix are missing from %s\" % SWIFT_CONF_FILE"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"class HybridMultiObjectDispatcher(object):"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def __init__(self, *objs):"},{"line_number":221,"context_line":"        self.objs \u003d objs"}],"source_content_type":"text/x-python","patch_set":10,"id":"bb4f5954_ed6150ff","line":218,"updated":"2024-05-15 16:02:01.000000000","message":"in the context of an object store, \u0027Object\u0027 in the class name might be a distraction.\n\nI\u0027m not sure I understand the use of \u0027Hybrid\u0027 or \u0027Dispatcher\u0027? It\u0027s dispatching getattr\u0027s I guess, but it\u0027s like a facade to attributes.","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"76a1adead4dffc836e4ffaa2ad497bd51703fdb8","unresolved":true,"context_lines":[{"line_number":215,"context_line":"            \"swift_hash_path_prefix are missing from %s\" % SWIFT_CONF_FILE"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"class HybridMultiObjectDispatcher(object):"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def __init__(self, *objs):"},{"line_number":221,"context_line":"        self.objs \u003d objs"}],"source_content_type":"text/x-python","patch_set":10,"id":"d3d271dd_995a6a2d","line":218,"in_reply_to":"19fcf4d4_abe6fa0a","updated":"2024-05-16 17:16:05.000000000","message":"one up from this (that would make IDEs happier) is just make a totally static object:\n\n    class ThisIsForOutOfTreeCode(object):\n\n        def __init__(self, logger, stats):\n            self.logger \u003d logger\n            self.stats \u003d stats\n\n        def debug(self, *args, **kwargs):\n            self.logger.debug(*args, **kwargs)\n\n        def increment(self, *args, **kwargs):\n            self.stats.increment(*args, **kwargs)\n\n        ...","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9bb01056ef419b1eba7bce17a0ece788e1c2586d","unresolved":true,"context_lines":[{"line_number":215,"context_line":"            \"swift_hash_path_prefix are missing from %s\" % SWIFT_CONF_FILE"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"class HybridMultiObjectDispatcher(object):"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def __init__(self, *objs):"},{"line_number":221,"context_line":"        self.objs \u003d objs"}],"source_content_type":"text/x-python","patch_set":10,"id":"19fcf4d4_abe6fa0a","line":218,"in_reply_to":"bb4f5954_ed6150ff","updated":"2024-05-15 23:39:30.000000000","message":"Do we have any other uses for this beyond this one use-case? I think I might be more inclined toward something more specialized, like\n```\nclass StatsdLogger(object):\n    STATSD_CLIENT_METHODS \u003d (\n        \u0027update_stats\u0027,\n        \u0027increment\u0027,\n        \u0027decrement\u0027,\n        \u0027timing\u0027,\n        \u0027timing_since\u0027,\n        \u0027transfer_rate\u0027,\n    )\n\n    def __init__(self, logger, statsd_client):\n        self.logger \u003d logger\n        self.statsd_client \u003d statsd_client\n\n    def _noop(self, *a, **kw):\n        pass\n\n    def __getattr__(self, name):\n        if name in self.STATSD_CLIENT_METHODS:\n            if self.statsd_client:\n                return getattr(self.statsd_client, name)\n            return self._noop\n        else:\n            return getattr(self.logger, name)\n```\nand I *think* the `_noop` can even go away if we like the direction of https://review.opendev.org/c/openstack/swift/+/919780","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4b0ce629e546c5d589c103c11336480d3c155303","unresolved":false,"context_lines":[{"line_number":215,"context_line":"            \"swift_hash_path_prefix are missing from %s\" % SWIFT_CONF_FILE"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"class HybridMultiObjectDispatcher(object):"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def __init__(self, *objs):"},{"line_number":221,"context_line":"        self.objs \u003d objs"}],"source_content_type":"text/x-python","patch_set":10,"id":"c5396fad_a090e02f","line":218,"in_reply_to":"d3d271dd_995a6a2d","updated":"2024-06-03 23:54:41.000000000","message":"Acknowledged","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"7efedbd417183dccd3e35f831ccc2cbdba74d338","unresolved":true,"context_lines":[{"line_number":221,"context_line":"        self.objs \u003d objs"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def __getattr__(self, name):"},{"line_number":224,"context_line":"        for obj in self.objs:"},{"line_number":225,"context_line":"            if hasattr(obj, name):"},{"line_number":226,"context_line":"                return getattr(obj, name)"},{"line_number":227,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fbca4a83_2dd1b10f","line":224,"updated":"2024-05-15 16:02:01.000000000","message":"have you considered caching the results as attributes of self using setattr?\n\nI think there \u0027s some interesting considerations:\n* caching means that the static dispatcher gradually becomes static, and equivalent to the current \"patch in delegates up-front\" approach\n* once cached, an attribute would not reflect changes to the underlying (wrapped) object - so mocking the underlying object would not affect the dispatcher","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9bb01056ef419b1eba7bce17a0ece788e1c2586d","unresolved":true,"context_lines":[{"line_number":221,"context_line":"        self.objs \u003d objs"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def __getattr__(self, name):"},{"line_number":224,"context_line":"        for obj in self.objs:"},{"line_number":225,"context_line":"            if hasattr(obj, name):"},{"line_number":226,"context_line":"                return getattr(obj, name)"},{"line_number":227,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ad2b33cb_c2439730","line":224,"in_reply_to":"134fb4a5_5ac324ec","updated":"2024-05-15 23:39:30.000000000","message":"I might be content to say that any performance degradation due to the lack of caching is intended as a stick to encourage movement toward using `statsd_client.get_statsd_client()` ;-)","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4b0ce629e546c5d589c103c11336480d3c155303","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        self.objs \u003d objs"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def __getattr__(self, name):"},{"line_number":224,"context_line":"        for obj in self.objs:"},{"line_number":225,"context_line":"            if hasattr(obj, name):"},{"line_number":226,"context_line":"                return getattr(obj, name)"},{"line_number":227,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7e94e451_822d01ad","line":224,"in_reply_to":"5f33ea2b_32cab71c","updated":"2024-06-03 23:54:41.000000000","message":"Acknowledged","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"76a1adead4dffc836e4ffaa2ad497bd51703fdb8","unresolved":true,"context_lines":[{"line_number":221,"context_line":"        self.objs \u003d objs"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def __getattr__(self, name):"},{"line_number":224,"context_line":"        for obj in self.objs:"},{"line_number":225,"context_line":"            if hasattr(obj, name):"},{"line_number":226,"context_line":"                return getattr(obj, name)"},{"line_number":227,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f33ea2b_32cab71c","line":224,"in_reply_to":"ad2b33cb_c2439730","updated":"2024-05-16 17:16:05.000000000","message":"^ this 100% we plan to fix all of swift in short order - we might even have those patches ready to go before we feel comfortable merging this.","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb5a2b7ee08b9b19c5f8445f15074c4c030b6d99","unresolved":true,"context_lines":[{"line_number":221,"context_line":"        self.objs \u003d objs"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def __getattr__(self, name):"},{"line_number":224,"context_line":"        for obj in self.objs:"},{"line_number":225,"context_line":"            if hasattr(obj, name):"},{"line_number":226,"context_line":"                return getattr(obj, name)"},{"line_number":227,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"134fb4a5_5ac324ec","line":224,"in_reply_to":"fbca4a83_2dd1b10f","updated":"2024-05-15 18:00:52.000000000","message":"caching seems likely to be reasonable, but maybe no obviously necessary since this dispatcher is mostly a shim for compatibility with out-of-tree code.  We hope to very soon move our in-tree code to using concrete instances:\n\n    - self.logger \u003d utils.get_logger()\n    + self.logger \u003d logs.get_adpated_logger()\n    + self.stats \u003d statsd_client.get_statsd_client()\n    \n... with a bunch of calls to `self.logger.increment` replace with `self.stats.increment` - not only with this make a lot more sense it\u0027ll also make everyone\u0027s IDEs happier.","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"7efedbd417183dccd3e35f831ccc2cbdba74d338","unresolved":true,"context_lines":[{"line_number":223,"context_line":"    def __getattr__(self, name):"},{"line_number":224,"context_line":"        for obj in self.objs:"},{"line_number":225,"context_line":"            if hasattr(obj, name):"},{"line_number":226,"context_line":"                return getattr(obj, name)"},{"line_number":227,"context_line":"        else:"},{"line_number":228,"context_line":"            raise AttributeError(\"Couldn\u0027t find it :(\")"},{"line_number":229,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"99048138_9dd0e73a","line":226,"updated":"2024-05-15 16:02:01.000000000","message":"probably more idiomatic to use ``try ... except AttributeError`` rather than ``if``","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"054d1fde17e13a9824e9319c72a05b94b4bccdc2","unresolved":false,"context_lines":[{"line_number":223,"context_line":"    def __getattr__(self, name):"},{"line_number":224,"context_line":"        for obj in self.objs:"},{"line_number":225,"context_line":"            if hasattr(obj, name):"},{"line_number":226,"context_line":"                return getattr(obj, name)"},{"line_number":227,"context_line":"        else:"},{"line_number":228,"context_line":"            raise AttributeError(\"Couldn\u0027t find it :(\")"},{"line_number":229,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"721f9482_86dd8327","line":226,"in_reply_to":"99048138_9dd0e73a","updated":"2024-05-29 19:23:29.000000000","message":"Acknowledged","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"7efedbd417183dccd3e35f831ccc2cbdba74d338","unresolved":true,"context_lines":[{"line_number":228,"context_line":"            raise AttributeError(\"Couldn\u0027t find it :(\")"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def debug(self):"},{"line_number":231,"context_line":"        pass"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"def set_swift_dir(swift_dir):"}],"source_content_type":"text/x-python","patch_set":10,"id":"561c42cf_8d039c76","line":231,"updated":"2024-05-15 16:02:01.000000000","message":"?","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ed9c95505b7a3d793654ecc8617060c8d244b6a3","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            raise AttributeError(\"Couldn\u0027t find it :(\")"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def debug(self):"},{"line_number":231,"context_line":"        pass"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"def set_swift_dir(swift_dir):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9d7e51b1_2cbf75bc","line":231,"in_reply_to":"561c42cf_8d039c76","updated":"2024-05-29 19:21:39.000000000","message":"Discarding","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"387075012855054d0b86ef693856d024aedde11a","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"def get_logger(conf, name\u003dNone, log_to_console\u003dFalse, log_route\u003dNone,"},{"line_number":209,"context_line":"               fmt\u003d\"%(server)s: %(message)s\", statsd_tail_prefix\u003dNone):"},{"line_number":210,"context_line":"    logger \u003d get_adapted_logger(conf, name, log_to_console, log_route, fmt,"},{"line_number":211,"context_line":"                                statsd_tail_prefix)"},{"line_number":212,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix,"}],"source_content_type":"text/x-python","patch_set":14,"id":"622b7fa2_72c774f6","line":209,"updated":"2024-06-04 00:46:01.000000000","message":"Good; matches to old signature of `get_logger` exactly!","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"387075012855054d0b86ef693856d024aedde11a","unresolved":true,"context_lines":[{"line_number":209,"context_line":"               fmt\u003d\"%(server)s: %(message)s\", statsd_tail_prefix\u003dNone):"},{"line_number":210,"context_line":"    logger \u003d get_adapted_logger(conf, name, log_to_console, log_route, fmt,"},{"line_number":211,"context_line":"                                statsd_tail_prefix)"},{"line_number":212,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix,"},{"line_number":213,"context_line":"                                             logger, name)"},{"line_number":214,"context_line":"    get_hybrid_logger \u003d LoggerStatsdFascade(logger, statsd)"},{"line_number":215,"context_line":"    return get_hybrid_logger"}],"source_content_type":"text/x-python","patch_set":14,"id":"57d44241_e2252a2e","line":212,"range":{"start_line":212,"start_character":51,"end_line":212,"end_character":69},"updated":"2024-06-04 00:46:01.000000000","message":"I feel like *this* is the spot where we ultimately want the\n```\nif statsd_tail_prefix is None:\n    statsd_tail_prefix \u003d name\n```\nto end up. It should be the only spot where logs and statsd stuff bleed together like this.","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"9267720323df2f9cc43cbe1cc4b161e8c7376520","unresolved":false,"context_lines":[{"line_number":209,"context_line":"               fmt\u003d\"%(server)s: %(message)s\", statsd_tail_prefix\u003dNone):"},{"line_number":210,"context_line":"    logger \u003d get_adapted_logger(conf, name, log_to_console, log_route, fmt,"},{"line_number":211,"context_line":"                                statsd_tail_prefix)"},{"line_number":212,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix,"},{"line_number":213,"context_line":"                                             logger, name)"},{"line_number":214,"context_line":"    get_hybrid_logger \u003d LoggerStatsdFascade(logger, statsd)"},{"line_number":215,"context_line":"    return get_hybrid_logger"}],"source_content_type":"text/x-python","patch_set":14,"id":"fba8fbd0_9dc347a4","line":212,"range":{"start_line":212,"start_character":51,"end_line":212,"end_character":69},"in_reply_to":"57d44241_e2252a2e","updated":"2024-06-05 20:14:42.000000000","message":"Acknowledged","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"387075012855054d0b86ef693856d024aedde11a","unresolved":true,"context_lines":[{"line_number":211,"context_line":"                                statsd_tail_prefix)"},{"line_number":212,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix,"},{"line_number":213,"context_line":"                                             logger, name)"},{"line_number":214,"context_line":"    get_hybrid_logger \u003d LoggerStatsdFascade(logger, statsd)"},{"line_number":215,"context_line":"    return get_hybrid_logger"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"19c2e357_f37ef849","line":214,"range":{"start_line":214,"start_character":4,"end_line":214,"end_character":21},"updated":"2024-06-04 00:46:01.000000000","message":"Drop the `get_`?","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"9267720323df2f9cc43cbe1cc4b161e8c7376520","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                                statsd_tail_prefix)"},{"line_number":212,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix,"},{"line_number":213,"context_line":"                                             logger, name)"},{"line_number":214,"context_line":"    get_hybrid_logger \u003d LoggerStatsdFascade(logger, statsd)"},{"line_number":215,"context_line":"    return get_hybrid_logger"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"d06ec36d_91c55f6a","line":214,"range":{"start_line":214,"start_character":4,"end_line":214,"end_character":21},"in_reply_to":"19c2e357_f37ef849","updated":"2024-06-05 20:14:42.000000000","message":"Done","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5e14195bda557ed6293fcb114ac5b31bfd7b6882","unresolved":true,"context_lines":[{"line_number":244,"context_line":"            if hasattr(self.statsd_client, name):"},{"line_number":245,"context_line":"                return getattr(self.statsd_client, name)"},{"line_number":246,"context_line":"            else:"},{"line_number":247,"context_line":"                raise AttributeError(\"Couldn\u0027t find it :(\")"},{"line_number":248,"context_line":"        if hasattr(self.logger, name):"},{"line_number":249,"context_line":"            return getattr(self.logger, name)"},{"line_number":250,"context_line":"        raise AttributeError(\"Couldn\u0027t find it :(\")"}],"source_content_type":"text/x-python","patch_set":18,"id":"8e8aea22_57658b70","line":247,"updated":"2024-06-07 20:17:07.000000000","message":"We could just say\n```\nif name in self.STATSD_CLIENT_METHODS:\n    return getattr(self.statsd_client, name)\n```\nWithout a default, the `getattr` call will raise the `AttributeError` for us.","commit_id":"8c31651474f513236065a699da52f7a5a3da1dde"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4a6f5f4651df64772f0db2993f6dfcab3f425698","unresolved":false,"context_lines":[{"line_number":244,"context_line":"            if hasattr(self.statsd_client, name):"},{"line_number":245,"context_line":"                return getattr(self.statsd_client, name)"},{"line_number":246,"context_line":"            else:"},{"line_number":247,"context_line":"                raise AttributeError(\"Couldn\u0027t find it :(\")"},{"line_number":248,"context_line":"        if hasattr(self.logger, name):"},{"line_number":249,"context_line":"            return getattr(self.logger, name)"},{"line_number":250,"context_line":"        raise AttributeError(\"Couldn\u0027t find it :(\")"}],"source_content_type":"text/x-python","patch_set":18,"id":"d7f0530f_46deb359","line":247,"in_reply_to":"8e8aea22_57658b70","updated":"2024-06-07 22:37:55.000000000","message":"Acknowledged","commit_id":"8c31651474f513236065a699da52f7a5a3da1dde"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5e14195bda557ed6293fcb114ac5b31bfd7b6882","unresolved":true,"context_lines":[{"line_number":247,"context_line":"                raise AttributeError(\"Couldn\u0027t find it :(\")"},{"line_number":248,"context_line":"        if hasattr(self.logger, name):"},{"line_number":249,"context_line":"            return getattr(self.logger, name)"},{"line_number":250,"context_line":"        raise AttributeError(\"Couldn\u0027t find it :(\")"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def set_statsd_prefix(self, prefix):"},{"line_number":253,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"3871125f_e96fbde7","line":250,"updated":"2024-06-07 20:17:07.000000000","message":"Similar argument here.","commit_id":"8c31651474f513236065a699da52f7a5a3da1dde"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4a6f5f4651df64772f0db2993f6dfcab3f425698","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                raise AttributeError(\"Couldn\u0027t find it :(\")"},{"line_number":248,"context_line":"        if hasattr(self.logger, name):"},{"line_number":249,"context_line":"            return getattr(self.logger, name)"},{"line_number":250,"context_line":"        raise AttributeError(\"Couldn\u0027t find it :(\")"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def set_statsd_prefix(self, prefix):"},{"line_number":253,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"f23fbd60_7d859c23","line":250,"in_reply_to":"3871125f_e96fbde7","updated":"2024-06-07 22:37:55.000000000","message":"Acknowledged","commit_id":"8c31651474f513236065a699da52f7a5a3da1dde"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5e14195bda557ed6293fcb114ac5b31bfd7b6882","unresolved":true,"context_lines":[{"line_number":269,"context_line":"        if self.statsd_client:"},{"line_number":270,"context_line":"            self.statsd_client._set_prefix(prefix)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def noop(self, *args, **kwargs):"},{"line_number":273,"context_line":"        pass"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":18,"id":"d1b81787_b62dbdbb","line":272,"updated":"2024-06-07 20:17:07.000000000","message":"No longer needed, yeah?","commit_id":"8c31651474f513236065a699da52f7a5a3da1dde"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4a6f5f4651df64772f0db2993f6dfcab3f425698","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        if self.statsd_client:"},{"line_number":270,"context_line":"            self.statsd_client._set_prefix(prefix)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def noop(self, *args, **kwargs):"},{"line_number":273,"context_line":"        pass"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":18,"id":"a56462ef_68811588","line":272,"in_reply_to":"d1b81787_b62dbdbb","updated":"2024-06-07 22:37:55.000000000","message":"Acknowledged","commit_id":"8c31651474f513236065a699da52f7a5a3da1dde"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5e14195bda557ed6293fcb114ac5b31bfd7b6882","unresolved":true,"context_lines":[{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    @property"},{"line_number":276,"context_line":"    def txn_id(self):"},{"line_number":277,"context_line":"        # if hasattr(self.logger, \u0027txn_id\u0027):"},{"line_number":278,"context_line":"        return self.logger.txn_id"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    @txn_id.setter"}],"source_content_type":"text/x-python","patch_set":18,"id":"c35a38ad_165c0289","line":277,"updated":"2024-06-07 20:17:07.000000000","message":"?","commit_id":"8c31651474f513236065a699da52f7a5a3da1dde"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4a6f5f4651df64772f0db2993f6dfcab3f425698","unresolved":false,"context_lines":[{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    @property"},{"line_number":276,"context_line":"    def txn_id(self):"},{"line_number":277,"context_line":"        # if hasattr(self.logger, \u0027txn_id\u0027):"},{"line_number":278,"context_line":"        return self.logger.txn_id"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    @txn_id.setter"}],"source_content_type":"text/x-python","patch_set":18,"id":"42f98fe7_b37ab1e6","line":277,"in_reply_to":"c35a38ad_165c0289","updated":"2024-06-07 22:37:55.000000000","message":"Done","commit_id":"8c31651474f513236065a699da52f7a5a3da1dde"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5e14195bda557ed6293fcb114ac5b31bfd7b6882","unresolved":true,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    @property"},{"line_number":285,"context_line":"    def client_ip(self):"},{"line_number":286,"context_line":"        # if hasattr(self.logger, \u0027client_ip\u0027):"},{"line_number":287,"context_line":"        return self.logger.client_ip"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    @client_ip.setter"}],"source_content_type":"text/x-python","patch_set":18,"id":"f3fb51ab_522b5364","line":286,"updated":"2024-06-07 20:17:07.000000000","message":"?","commit_id":"8c31651474f513236065a699da52f7a5a3da1dde"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4a6f5f4651df64772f0db2993f6dfcab3f425698","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    @property"},{"line_number":285,"context_line":"    def client_ip(self):"},{"line_number":286,"context_line":"        # if hasattr(self.logger, \u0027client_ip\u0027):"},{"line_number":287,"context_line":"        return self.logger.client_ip"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    @client_ip.setter"}],"source_content_type":"text/x-python","patch_set":18,"id":"4b432a90_8f85954b","line":286,"in_reply_to":"f3fb51ab_522b5364","updated":"2024-06-07 22:37:55.000000000","message":"Done","commit_id":"8c31651474f513236065a699da52f7a5a3da1dde"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"15a22f76ac178c309b2b9a766a465c5d34333ec3","unresolved":true,"context_lines":[{"line_number":223,"context_line":"            \"swift_hash_path_prefix are missing from %s\" % SWIFT_CONF_FILE"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"class LoggerStatsdFascade(object):"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    STATSD_CLIENT_METHODS \u003d ("},{"line_number":229,"context_line":"        \u0027update_stats\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"238c04e6_71b4c231","line":226,"range":{"start_line":226,"start_character":18,"end_line":226,"end_character":25},"updated":"2024-06-12 15:44:56.000000000","message":"spelling: s/Fascade/Facade/","commit_id":"8cc58dd803339ed73e962c090a65c96af1dad71a"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"5e064983554805d0c45ea5be10130d5421b0cd17","unresolved":false,"context_lines":[{"line_number":223,"context_line":"            \"swift_hash_path_prefix are missing from %s\" % SWIFT_CONF_FILE"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"class LoggerStatsdFascade(object):"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    STATSD_CLIENT_METHODS \u003d ("},{"line_number":229,"context_line":"        \u0027update_stats\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"b940813b_be8d6802","line":226,"range":{"start_line":226,"start_character":18,"end_line":226,"end_character":25},"in_reply_to":"238c04e6_71b4c231","updated":"2024-06-25 19:15:39.000000000","message":"Acknowledged","commit_id":"8cc58dd803339ed73e962c090a65c96af1dad71a"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fad901b50827fe18736c41012a1f66d41fc63e24","unresolved":true,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"def get_logger(conf, name\u003dNone, log_to_console\u003dFalse, log_route\u003dNone,"},{"line_number":209,"context_line":"               fmt\u003d\"%(server)s: %(message)s\", tail_prefix\u003dNone):"},{"line_number":210,"context_line":"    logger \u003d get_adapted_logger(conf, name, log_to_console, log_route, fmt)"},{"line_number":211,"context_line":"    if tail_prefix is None:"},{"line_number":212,"context_line":"        tail_prefix \u003d name"}],"source_content_type":"text/x-python","patch_set":27,"id":"878d74e8_c1d95b2d","line":209,"range":{"start_line":209,"start_character":46,"end_line":209,"end_character":57},"updated":"2024-08-26 17:23:13.000000000","message":"The old signature in `logs.py` looks like\n```\ndef get_logger(conf, name\u003dNone, log_to_console\u003dFalse, log_route\u003dNone,\n               fmt\u003d\"%(server)s: %(message)s\", statsd_tail_prefix\u003dNone):\n```\nI think we need to keep it as `statsd_tail_prefix` so we don\u0027t break 3rd parties.\n\nLove that we can drop the `statsd_` prefix in `get_statsd_client`, though! 👍","commit_id":"f43faeaff14e88b81013f2408f7a39ea1f190f9c"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"44a2521ba20489650ab919e85e21bddfcd5feb3f","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"def get_logger(conf, name\u003dNone, log_to_console\u003dFalse, log_route\u003dNone,"},{"line_number":209,"context_line":"               fmt\u003d\"%(server)s: %(message)s\", tail_prefix\u003dNone):"},{"line_number":210,"context_line":"    logger \u003d get_adapted_logger(conf, name, log_to_console, log_route, fmt)"},{"line_number":211,"context_line":"    if tail_prefix is None:"},{"line_number":212,"context_line":"        tail_prefix \u003d name"}],"source_content_type":"text/x-python","patch_set":27,"id":"f4170222_0f2a7f8c","line":209,"range":{"start_line":209,"start_character":46,"end_line":209,"end_character":57},"in_reply_to":"878d74e8_c1d95b2d","updated":"2024-08-27 17:54:43.000000000","message":"Acknowledged","commit_id":"f43faeaff14e88b81013f2408f7a39ea1f190f9c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fad901b50827fe18736c41012a1f66d41fc63e24","unresolved":true,"context_lines":[{"line_number":232,"context_line":"        \u0027timing\u0027,"},{"line_number":233,"context_line":"        \u0027timing_since\u0027,"},{"line_number":234,"context_line":"        \u0027transfer_rate\u0027,"},{"line_number":235,"context_line":"        \u0027get_increment_counts\u0027,"},{"line_number":236,"context_line":"    )"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def __init__(self, logger, statsd):"}],"source_content_type":"text/x-python","patch_set":27,"id":"f8bef20f_ee694160","line":235,"range":{"start_line":235,"start_character":9,"end_line":235,"end_character":29},"updated":"2024-08-26 17:23:13.000000000","message":"Just for the sake of tests, I take it?","commit_id":"f43faeaff14e88b81013f2408f7a39ea1f190f9c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"cc54773dcdf66bf60281481bed7cdf9d461b3fb7","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        \u0027timing\u0027,"},{"line_number":233,"context_line":"        \u0027timing_since\u0027,"},{"line_number":234,"context_line":"        \u0027transfer_rate\u0027,"},{"line_number":235,"context_line":"        \u0027get_increment_counts\u0027,"},{"line_number":236,"context_line":"    )"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def __init__(self, logger, statsd):"}],"source_content_type":"text/x-python","patch_set":27,"id":"b4b6f75a_59db7b67","line":235,"range":{"start_line":235,"start_character":9,"end_line":235,"end_character":29},"in_reply_to":"0428e4fa_18a18fba","updated":"2024-08-27 18:55:39.000000000","message":"Might be worth a comment.","commit_id":"f43faeaff14e88b81013f2408f7a39ea1f190f9c"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"44a2521ba20489650ab919e85e21bddfcd5feb3f","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        \u0027timing\u0027,"},{"line_number":233,"context_line":"        \u0027timing_since\u0027,"},{"line_number":234,"context_line":"        \u0027transfer_rate\u0027,"},{"line_number":235,"context_line":"        \u0027get_increment_counts\u0027,"},{"line_number":236,"context_line":"    )"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def __init__(self, logger, statsd):"}],"source_content_type":"text/x-python","patch_set":27,"id":"0428e4fa_18a18fba","line":235,"range":{"start_line":235,"start_character":9,"end_line":235,"end_character":29},"in_reply_to":"f8bef20f_ee694160","updated":"2024-08-27 17:54:43.000000000","message":"Yes!","commit_id":"f43faeaff14e88b81013f2408f7a39ea1f190f9c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fad901b50827fe18736c41012a1f66d41fc63e24","unresolved":true,"context_lines":[{"line_number":243,"context_line":"        if name in self.STATSD_CLIENT_METHODS:"},{"line_number":244,"context_line":"            if name in self.STATSD_CLIENT_METHODS:"},{"line_number":245,"context_line":"                return getattr(self.statsd_client, name)"},{"line_number":246,"context_line":"        if hasattr(self.logger, name):"},{"line_number":247,"context_line":"            return getattr(self.logger, name)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def set_statsd_prefix(self, prefix):"}],"source_content_type":"text/x-python","patch_set":27,"id":"b47cb3ed_1c0274ec","line":246,"updated":"2024-08-26 17:23:13.000000000","message":"We should drop the `hasattr` check; as it stands, any typo silently gets me a `None` when I\u0027d really prefer an `AttributeError`\n```\n\u003e\u003e\u003e from swift.common.utils import get_logger\n\u003e\u003e\u003e l\u003dget_logger({})\n\u003e\u003e\u003e l.thread_locals\n(None, None)\n\u003e\u003e\u003e l.therad_locals\n\u003e\u003e\u003e l.asdf\n\u003e\u003e\u003e \n```","commit_id":"f43faeaff14e88b81013f2408f7a39ea1f190f9c"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"44a2521ba20489650ab919e85e21bddfcd5feb3f","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        if name in self.STATSD_CLIENT_METHODS:"},{"line_number":244,"context_line":"            if name in self.STATSD_CLIENT_METHODS:"},{"line_number":245,"context_line":"                return getattr(self.statsd_client, name)"},{"line_number":246,"context_line":"        if hasattr(self.logger, name):"},{"line_number":247,"context_line":"            return getattr(self.logger, name)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def set_statsd_prefix(self, prefix):"}],"source_content_type":"text/x-python","patch_set":27,"id":"acc22b5a_376d1268","line":246,"in_reply_to":"b47cb3ed_1c0274ec","updated":"2024-08-27 17:54:43.000000000","message":"Adding a check: if hasattr is None, raise Attribute Error","commit_id":"f43faeaff14e88b81013f2408f7a39ea1f190f9c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fad901b50827fe18736c41012a1f66d41fc63e24","unresolved":true,"context_lines":[{"line_number":249,"context_line":"    def set_statsd_prefix(self, prefix):"},{"line_number":250,"context_line":"        \"\"\""},{"line_number":251,"context_line":"        This method is deprecated. Callers should use the"},{"line_number":252,"context_line":"        ``tail_prefix`` argument of ``get_adapted_logger``"},{"line_number":253,"context_line":"        when instantiating a logger."},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        The StatsD client prefix defaults to the \"name\" of the logger.  This"}],"source_content_type":"text/x-python","patch_set":27,"id":"6d536d32_8b363993","line":252,"range":{"start_line":252,"start_character":38,"end_line":252,"end_character":56},"updated":"2024-08-26 17:23:13.000000000","message":"`get_logger`","commit_id":"f43faeaff14e88b81013f2408f7a39ea1f190f9c"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"44a2521ba20489650ab919e85e21bddfcd5feb3f","unresolved":false,"context_lines":[{"line_number":249,"context_line":"    def set_statsd_prefix(self, prefix):"},{"line_number":250,"context_line":"        \"\"\""},{"line_number":251,"context_line":"        This method is deprecated. Callers should use the"},{"line_number":252,"context_line":"        ``tail_prefix`` argument of ``get_adapted_logger``"},{"line_number":253,"context_line":"        when instantiating a logger."},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        The StatsD client prefix defaults to the \"name\" of the logger.  This"}],"source_content_type":"text/x-python","patch_set":27,"id":"6ee31a47_6bc15e75","line":252,"range":{"start_line":252,"start_character":38,"end_line":252,"end_character":56},"in_reply_to":"6d536d32_8b363993","updated":"2024-08-27 17:54:43.000000000","message":"Done","commit_id":"f43faeaff14e88b81013f2408f7a39ea1f190f9c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fad901b50827fe18736c41012a1f66d41fc63e24","unresolved":true,"context_lines":[{"line_number":259,"context_line":"        \"\"\""},{"line_number":260,"context_line":"        warnings.warn("},{"line_number":261,"context_line":"            \u0027set_statsd_prefix() is deprecated; use \u0027"},{"line_number":262,"context_line":"            \u0027the \u0027\u0027``tail_prefix`` \u0027"},{"line_number":263,"context_line":"            \u0027argument to ``get_adapted_logger`` instead.\u0027,"},{"line_number":264,"context_line":"            DeprecationWarning, stacklevel\u003d2"},{"line_number":265,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":27,"id":"3ab3c95e_de23d953","line":262,"range":{"start_line":262,"start_character":17,"end_line":262,"end_character":19},"updated":"2024-08-26 17:23:13.000000000","message":"These just collapse, yeah?","commit_id":"f43faeaff14e88b81013f2408f7a39ea1f190f9c"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"44a2521ba20489650ab919e85e21bddfcd5feb3f","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        \"\"\""},{"line_number":260,"context_line":"        warnings.warn("},{"line_number":261,"context_line":"            \u0027set_statsd_prefix() is deprecated; use \u0027"},{"line_number":262,"context_line":"            \u0027the \u0027\u0027``tail_prefix`` \u0027"},{"line_number":263,"context_line":"            \u0027argument to ``get_adapted_logger`` instead.\u0027,"},{"line_number":264,"context_line":"            DeprecationWarning, stacklevel\u003d2"},{"line_number":265,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":27,"id":"9f4af0e5_9f4d8e02","line":262,"range":{"start_line":262,"start_character":17,"end_line":262,"end_character":19},"in_reply_to":"3ab3c95e_de23d953","updated":"2024-08-27 17:54:43.000000000","message":"Yes, but removed","commit_id":"f43faeaff14e88b81013f2408f7a39ea1f190f9c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fad901b50827fe18736c41012a1f66d41fc63e24","unresolved":true,"context_lines":[{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    @thread_locals.setter"},{"line_number":290,"context_line":"    def thread_locals(self, value):"},{"line_number":291,"context_line":"        self.txn_id, self.client_ip \u003d value"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"def set_swift_dir(swift_dir):"}],"source_content_type":"text/x-python","patch_set":27,"id":"16d0569d_ec775418","line":291,"updated":"2024-08-26 17:23:13.000000000","message":"The logger still has `thread_locals`, too, yeah? I\u0027d be partial towards\n```\n    @property\n    def thread_locals(self):\n        return self.logger.thread_locals\n\n    @thread_locals.setter\n    def thread_locals(self, value):\n        self.logger.thread_locals \u003d value\n```\nthen we don\u0027t need to know *here* exactly what\u0027s in the bucket of `thread_locals` over *there*.","commit_id":"f43faeaff14e88b81013f2408f7a39ea1f190f9c"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"44a2521ba20489650ab919e85e21bddfcd5feb3f","unresolved":false,"context_lines":[{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    @thread_locals.setter"},{"line_number":290,"context_line":"    def thread_locals(self, value):"},{"line_number":291,"context_line":"        self.txn_id, self.client_ip \u003d value"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"def set_swift_dir(swift_dir):"}],"source_content_type":"text/x-python","patch_set":27,"id":"63698635_67a4a765","line":291,"in_reply_to":"16d0569d_ec775418","updated":"2024-08-27 17:54:43.000000000","message":"Acknowledged","commit_id":"f43faeaff14e88b81013f2408f7a39ea1f190f9c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"cc54773dcdf66bf60281481bed7cdf9d461b3fb7","unresolved":true,"context_lines":[{"line_number":240,"context_line":"        self.statsd_client \u003d statsd"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def __getattr__(self, name):"},{"line_number":243,"context_line":"        if name in self.STATSD_CLIENT_METHODS:"},{"line_number":244,"context_line":"            if name in self.STATSD_CLIENT_METHODS:"},{"line_number":245,"context_line":"                return getattr(self.statsd_client, name)"},{"line_number":246,"context_line":"        if hasattr(self.logger, name) and hasattr(self.logger, name) is not None:"},{"line_number":247,"context_line":"            return getattr(self.logger, name)"}],"source_content_type":"text/x-python","patch_set":28,"id":"f1a05955_ebc210f0","line":244,"range":{"start_line":243,"start_character":8,"end_line":244,"end_character":50},"updated":"2024-08-27 18:55:39.000000000","message":"I only just noticed the doubled-up ifs.","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"c0f2da970fc99d4518b2f67375e79a85b4eec160","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self.statsd_client \u003d statsd"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def __getattr__(self, name):"},{"line_number":243,"context_line":"        if name in self.STATSD_CLIENT_METHODS:"},{"line_number":244,"context_line":"            if name in self.STATSD_CLIENT_METHODS:"},{"line_number":245,"context_line":"                return getattr(self.statsd_client, name)"},{"line_number":246,"context_line":"        if hasattr(self.logger, name) and hasattr(self.logger, name) is not None:"},{"line_number":247,"context_line":"            return getattr(self.logger, name)"}],"source_content_type":"text/x-python","patch_set":28,"id":"875419ff_e3306514","line":244,"range":{"start_line":243,"start_character":8,"end_line":244,"end_character":50},"in_reply_to":"f1a05955_ebc210f0","updated":"2024-08-28 15:54:02.000000000","message":"Ah, done!","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"cc54773dcdf66bf60281481bed7cdf9d461b3fb7","unresolved":true,"context_lines":[{"line_number":246,"context_line":"        if hasattr(self.logger, name) and hasattr(self.logger, name) is not None:"},{"line_number":247,"context_line":"            return getattr(self.logger, name)"},{"line_number":248,"context_line":"        else:"},{"line_number":249,"context_line":"            raise AttributeError(\"%s has no attribute %r\" % (self.logger, name))"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def set_statsd_prefix(self, prefix):"},{"line_number":252,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":28,"id":"db02ce7c_a23e34e0","line":249,"updated":"2024-08-27 18:55:39.000000000","message":"I think we could just have\n```\n    def __getattr__(self, name):\n        if name in self.STATSD_CLIENT_METHODS:\n            return getattr(self.statsd_client, name)\n        return getattr(self.logger, name)\n```\nIt comes out a little indirect, but gets the point across:\n```\n\u003e\u003e\u003e from swift.common.utils import *\n\u003e\u003e\u003e l\u003dget_logger({})\n\u003e\u003e\u003e l.asdf\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  File \"/vagrant/swift/swift/common/utils/__init__.py\", line 245, in __getattr__\n    return getattr(self.logger, name)\nAttributeError: \u0027LogAdapter\u0027 object has no attribute \u0027asdf\u0027\n```","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"c0f2da970fc99d4518b2f67375e79a85b4eec160","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        if hasattr(self.logger, name) and hasattr(self.logger, name) is not None:"},{"line_number":247,"context_line":"            return getattr(self.logger, name)"},{"line_number":248,"context_line":"        else:"},{"line_number":249,"context_line":"            raise AttributeError(\"%s has no attribute %r\" % (self.logger, name))"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def set_statsd_prefix(self, prefix):"},{"line_number":252,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":28,"id":"8f5c8e97_718edca8","line":249,"in_reply_to":"db02ce7c_a23e34e0","updated":"2024-08-28 15:54:02.000000000","message":"Acknowledged","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7527eeba61016ee6907c090e51c13d747bef2c2e","unresolved":true,"context_lines":[{"line_number":262,"context_line":"        warnings.warn("},{"line_number":263,"context_line":"            \u0027set_statsd_prefix() is deprecated; use \u0027"},{"line_number":264,"context_line":"            \u0027the ``tail_prefix`` \u0027"},{"line_number":265,"context_line":"            \u0027argument to ``get_adapted_logger`` instead.\u0027,"},{"line_number":266,"context_line":"            DeprecationWarning, stacklevel\u003d2"},{"line_number":267,"context_line":"        )"},{"line_number":268,"context_line":"        if self.statsd_client:"}],"source_content_type":"text/x-python","patch_set":28,"id":"b45f0975_83a7e8a5","line":265,"range":{"start_line":265,"start_character":27,"end_line":265,"end_character":45},"updated":"2024-08-27 22:53:17.000000000","message":"Oh, we should say `get_logger` here, too...","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"c0f2da970fc99d4518b2f67375e79a85b4eec160","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        warnings.warn("},{"line_number":263,"context_line":"            \u0027set_statsd_prefix() is deprecated; use \u0027"},{"line_number":264,"context_line":"            \u0027the ``tail_prefix`` \u0027"},{"line_number":265,"context_line":"            \u0027argument to ``get_adapted_logger`` instead.\u0027,"},{"line_number":266,"context_line":"            DeprecationWarning, stacklevel\u003d2"},{"line_number":267,"context_line":"        )"},{"line_number":268,"context_line":"        if self.statsd_client:"}],"source_content_type":"text/x-python","patch_set":28,"id":"c5fa174c_e22db117","line":265,"range":{"start_line":265,"start_character":27,"end_line":265,"end_character":45},"in_reply_to":"b45f0975_83a7e8a5","updated":"2024-08-28 15:54:02.000000000","message":"Done","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b05dc9a6aeec207683fa30cab7feccab4fdee534","unresolved":true,"context_lines":[{"line_number":256,"context_line":"        \"\"\""},{"line_number":257,"context_line":"        warnings.warn("},{"line_number":258,"context_line":"            \u0027set_statsd_prefix() is deprecated; use \u0027"},{"line_number":259,"context_line":"            \u0027the ``tail_prefix`` argument to ``get_logger`` instead.\u0027,"},{"line_number":260,"context_line":"            DeprecationWarning, stacklevel\u003d2"},{"line_number":261,"context_line":"        )"},{"line_number":262,"context_line":"        if self.statsd_client:"}],"source_content_type":"text/x-python","patch_set":29,"id":"778418ac_0902ef0b","line":259,"range":{"start_line":259,"start_character":19,"end_line":259,"end_character":30},"updated":"2024-08-28 16:04:30.000000000","message":"Sorry -- I keep missing *something* in the warning -- this should be `statsd_tail_prefix` now (like on master), here and in the docstring.","commit_id":"75a85e159af0204003087c92afb4fb6c939c30cd"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4b5fd3e2bdd312c32f73bd498394113d1cd5f475","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        \"\"\""},{"line_number":257,"context_line":"        warnings.warn("},{"line_number":258,"context_line":"            \u0027set_statsd_prefix() is deprecated; use \u0027"},{"line_number":259,"context_line":"            \u0027the ``tail_prefix`` argument to ``get_logger`` instead.\u0027,"},{"line_number":260,"context_line":"            DeprecationWarning, stacklevel\u003d2"},{"line_number":261,"context_line":"        )"},{"line_number":262,"context_line":"        if self.statsd_client:"}],"source_content_type":"text/x-python","patch_set":29,"id":"ccf4e986_21fc4586","line":259,"range":{"start_line":259,"start_character":19,"end_line":259,"end_character":30},"in_reply_to":"778418ac_0902ef0b","updated":"2024-08-29 18:33:29.000000000","message":"Acknowledged","commit_id":"75a85e159af0204003087c92afb4fb6c939c30cd"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"52401de55d5d61d38afa7c03381f38d2c210ffa7","unresolved":true,"context_lines":[{"line_number":251,"context_line":"        return self.logger.timing_since(*a, **kw)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def transfer_rate(self, *a, **kw):"},{"line_number":254,"context_line":"        return self.logger.transfer_rate(*a, **kw)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    @property"},{"line_number":257,"context_line":"    def thread_locals(self):"}],"source_content_type":"text/x-python","patch_set":30,"id":"54aef922_b23c21e5","line":254,"updated":"2024-08-29 22:00:26.000000000","message":"I think we can ditch all of these stats-related functions now that we should *only* be wrapping loggers/log adapters.\n\nWhich would also seem to satisfy Clay\u0027s objection to these classes being in logs.py -- and if we put them back there (while keeping `get_prefixed_logger` here), we shouldn\u0027t have to worry about fixing up the comment about \"LogAdapter, below\"","commit_id":"59ac0d72ad675530c2d5d073bf0afde04e4ddf5e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"7367494d181516febfcd5e2fc9b9076a6f2305ca","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        return self.logger.timing_since(*a, **kw)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def transfer_rate(self, *a, **kw):"},{"line_number":254,"context_line":"        return self.logger.transfer_rate(*a, **kw)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    @property"},{"line_number":257,"context_line":"    def thread_locals(self):"}],"source_content_type":"text/x-python","patch_set":30,"id":"54595578_14abc1b0","line":254,"in_reply_to":"54aef922_b23c21e5","updated":"2024-08-30 14:18:58.000000000","message":"Acknowledged","commit_id":"59ac0d72ad675530c2d5d073bf0afde04e4ddf5e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"52401de55d5d61d38afa7c03381f38d2c210ffa7","unresolved":true,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def exception(self, msg, *a, **kw):"},{"line_number":265,"context_line":"        # We up-call to exception() where stdlib uses error() so we can get"},{"line_number":266,"context_line":"        # some of the traceback suppression from LogAdapter, below"},{"line_number":267,"context_line":"        self.logger.exception(msg, *a, **kw)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"f8d215d5_3c5ff018","line":266,"range":{"start_line":266,"start_character":49,"end_line":266,"end_character":66},"updated":"2024-08-29 22:00:26.000000000","message":"Where now?","commit_id":"59ac0d72ad675530c2d5d073bf0afde04e4ddf5e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"7367494d181516febfcd5e2fc9b9076a6f2305ca","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def exception(self, msg, *a, **kw):"},{"line_number":265,"context_line":"        # We up-call to exception() where stdlib uses error() so we can get"},{"line_number":266,"context_line":"        # some of the traceback suppression from LogAdapter, below"},{"line_number":267,"context_line":"        self.logger.exception(msg, *a, **kw)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"5b8c4049_123c7870","line":266,"range":{"start_line":266,"start_character":49,"end_line":266,"end_character":66},"in_reply_to":"f8d215d5_3c5ff018","updated":"2024-08-30 14:18:58.000000000","message":"Moved back to logs","commit_id":"59ac0d72ad675530c2d5d073bf0afde04e4ddf5e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"52401de55d5d61d38afa7c03381f38d2c210ffa7","unresolved":true,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"def get_prefixed_logger(facade_object, prefix):"},{"line_number":292,"context_line":"    prefixed_logger \u003d PrefixLoggerAdapter(facade_object.logger, prefix)"},{"line_number":293,"context_line":"    return LoggerStatsdFacade(prefixed_logger, facade_object.statsd_client)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"ef1bbdf6_880f5819","line":292,"range":{"start_line":292,"start_character":64,"end_line":292,"end_character":70},"updated":"2024-08-29 22:00:26.000000000","message":"This arg isn\u0027t actually the prefix -- it\u0027s some [`extras` dict](https://github.com/python/cpython/blob/v3.12.5/Lib/logging/__init__.py#L1884-L1896) which we always pass as `{}`.\n\nMaybe we could do something like\n```\ndef get_prefixed_logger(facade_object):\n    prefixed_logger \u003d PrefixLoggerAdapter(facade_object.logger, {})\n    return LoggerStatsdFacade(prefixed_logger, facade_object.statsd_client)\n```\nor even\n```\ndef get_prefixed_logger(logger):\n    if isinstance(logger, LoggerStatsdFacade):\n        prefixed_logger \u003d PrefixLoggerAdapter(logger.logger, {})\n        return LoggerStatsdFacade(prefixed_logger, logger.statsd_client)\n    else:\n        return PrefixLoggerAdapter(logger, {})\n```\n\nStill makes for a rather weird API though: \"Hey, I know I want a logger with some common prefix -- but I\u0027m not going to tell you the prefix yet (or maybe ever?), just get me a thing that I can call `set_prefix` on *later*.\"\n\nBut that\u0027s not this patch\u0027s fault, it\u0027s always been like that.","commit_id":"59ac0d72ad675530c2d5d073bf0afde04e4ddf5e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"7367494d181516febfcd5e2fc9b9076a6f2305ca","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"def get_prefixed_logger(facade_object, prefix):"},{"line_number":292,"context_line":"    prefixed_logger \u003d PrefixLoggerAdapter(facade_object.logger, prefix)"},{"line_number":293,"context_line":"    return LoggerStatsdFacade(prefixed_logger, facade_object.statsd_client)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"fc3ae281_e06afc6c","line":292,"range":{"start_line":292,"start_character":64,"end_line":292,"end_character":70},"in_reply_to":"ef1bbdf6_880f5819","updated":"2024-08-30 14:18:58.000000000","message":"Acknowledged","commit_id":"59ac0d72ad675530c2d5d073bf0afde04e4ddf5e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"ca185e484f3c640b91b5c88330add99dd0d394ad","unresolved":true,"context_lines":[{"line_number":87,"context_line":"from swift.common.utils.logs import (   # noqa"},{"line_number":88,"context_line":"    SysLogHandler,  # t.u.helpers.setup_servers monkey patch is sketch"},{"line_number":89,"context_line":"    logging_monkey_patch,"},{"line_number":90,"context_line":"    get_adapted_logger,"},{"line_number":91,"context_line":"    PrefixLoggerAdapter,"},{"line_number":92,"context_line":"    LogLevelFilter,"},{"line_number":93,"context_line":"    NullLogger,"}],"source_content_type":"text/x-python","patch_set":33,"id":"0ad3edb7_9482243f","line":90,"updated":"2024-09-11 04:11:55.000000000","message":"Not 100% convinced I like that the new interface of just getting a \"swift\" logger is called get_adapted_logger.. doesn\u0027t roll off the tongue. Esp elsewhere in python we can just use get_logger.\n\nI totally understand we need a hybrid logger for people to use.. But I wonder if we can use\n\n```\nswift.common.utils.logs.get_logger() to get a logger\nswift.common.utils.get_logger() to get a hybrid logger\n```\nThe latter for backwards compat.\n \nThen in this case, for this file we can just:\n```\nfrom swift.common.utils.logs import (\n...\n   get_logger as get_adapted_logger,\n...\n```\n\nAs I assume you had to rename it so there wasn\u0027t a conflict.\n\nOr am I missing some discussion where we sattled on get_adapted_logger. Because I wouldn\u0027t think to use that function, even if it is a LogAdaptor applied to a logger. I kinda just want a `get_logger` to get me well the logger I want to use.\n\nMaybe just my 2 cents.","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"f39485ce50fd147a787f80b07de87c25e00b4c61","unresolved":true,"context_lines":[{"line_number":87,"context_line":"from swift.common.utils.logs import (   # noqa"},{"line_number":88,"context_line":"    SysLogHandler,  # t.u.helpers.setup_servers monkey patch is sketch"},{"line_number":89,"context_line":"    logging_monkey_patch,"},{"line_number":90,"context_line":"    get_adapted_logger,"},{"line_number":91,"context_line":"    PrefixLoggerAdapter,"},{"line_number":92,"context_line":"    LogLevelFilter,"},{"line_number":93,"context_line":"    NullLogger,"}],"source_content_type":"text/x-python","patch_set":33,"id":"968d0f7e_968e7873","line":90,"in_reply_to":"0ad3edb7_9482243f","updated":"2024-09-11 14:01:02.000000000","message":"How about the name \"get_swift_logger\"?\nNaming just logger and swift\u0027s logger both from get_logger would definitely conflict.","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"3abed308b51252b413169f97693b298704c411ea","unresolved":false,"context_lines":[{"line_number":87,"context_line":"from swift.common.utils.logs import (   # noqa"},{"line_number":88,"context_line":"    SysLogHandler,  # t.u.helpers.setup_servers monkey patch is sketch"},{"line_number":89,"context_line":"    logging_monkey_patch,"},{"line_number":90,"context_line":"    get_adapted_logger,"},{"line_number":91,"context_line":"    PrefixLoggerAdapter,"},{"line_number":92,"context_line":"    LogLevelFilter,"},{"line_number":93,"context_line":"    NullLogger,"}],"source_content_type":"text/x-python","patch_set":33,"id":"5f2f2420_dc84d310","line":90,"in_reply_to":"968d0f7e_968e7873","updated":"2024-09-17 19:09:38.000000000","message":"Done","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"ca185e484f3c640b91b5c88330add99dd0d394ad","unresolved":true,"context_lines":[{"line_number":213,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix,"},{"line_number":214,"context_line":"                                             logger)"},{"line_number":215,"context_line":"    hybrid_logger \u003d LoggerStatsdFacade(logger, statsd)"},{"line_number":216,"context_line":"    return hybrid_logger"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"class InvalidHashPathConfigError(ValueError):"}],"source_content_type":"text/x-python","patch_set":33,"id":"0ce6bbcb_cfa94442","line":216,"updated":"2024-09-11 04:11:55.000000000","message":"OK so just a call to util.get_logger will use this to give us a legecy like hybrid logger.","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"f39485ce50fd147a787f80b07de87c25e00b4c61","unresolved":false,"context_lines":[{"line_number":213,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix,"},{"line_number":214,"context_line":"                                             logger)"},{"line_number":215,"context_line":"    hybrid_logger \u003d LoggerStatsdFacade(logger, statsd)"},{"line_number":216,"context_line":"    return hybrid_logger"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"class InvalidHashPathConfigError(ValueError):"}],"source_content_type":"text/x-python","patch_set":33,"id":"1aa0cfb4_8dee1614","line":216,"in_reply_to":"0ce6bbcb_cfa94442","updated":"2024-09-11 14:01:02.000000000","message":"Yes, the legacy get_logger","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e4423839129427459f8851b2bc3ed58f09aa6390","unresolved":true,"context_lines":[{"line_number":211,"context_line":"    if statsd_tail_prefix is None:"},{"line_number":212,"context_line":"        statsd_tail_prefix \u003d name"},{"line_number":213,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix,"},{"line_number":214,"context_line":"                                             logger)"},{"line_number":215,"context_line":"    hybrid_logger \u003d LoggerStatsdFacade(logger, statsd)"},{"line_number":216,"context_line":"    return hybrid_logger"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"26e5bb3d_0426f5d2","line":214,"range":{"start_line":214,"start_character":45,"end_line":214,"end_character":51},"updated":"2024-09-17 18:03:58.000000000","message":"logger is the LogAdapter instance. On master the statsd_client is init\u0027d with the Logger instance i.e ``logger.logger``. Making that change here fixed the two failing tests in test_server","commit_id":"44c983f8f67710ac815554edd35ab6fd0d708144"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"3abed308b51252b413169f97693b298704c411ea","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    if statsd_tail_prefix is None:"},{"line_number":212,"context_line":"        statsd_tail_prefix \u003d name"},{"line_number":213,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix,"},{"line_number":214,"context_line":"                                             logger)"},{"line_number":215,"context_line":"    hybrid_logger \u003d LoggerStatsdFacade(logger, statsd)"},{"line_number":216,"context_line":"    return hybrid_logger"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"94461f88_e271e9af","line":214,"range":{"start_line":214,"start_character":45,"end_line":214,"end_character":51},"in_reply_to":"26e5bb3d_0426f5d2","updated":"2024-09-17 19:09:38.000000000","message":"Oh yes, that\u0027s perfect!","commit_id":"44c983f8f67710ac815554edd35ab6fd0d708144"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e4423839129427459f8851b2bc3ed58f09aa6390","unresolved":true,"context_lines":[{"line_number":213,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix,"},{"line_number":214,"context_line":"                                             logger)"},{"line_number":215,"context_line":"    hybrid_logger \u003d LoggerStatsdFacade(logger, statsd)"},{"line_number":216,"context_line":"    return hybrid_logger"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"class InvalidHashPathConfigError(ValueError):"}],"source_content_type":"text/x-python","patch_set":37,"id":"cb0124bd_30b2e63f","line":216,"updated":"2024-09-17 18:03:58.000000000","message":"nit: can be written ``return LoggerStatsdFacade(logger, statsd)``","commit_id":"44c983f8f67710ac815554edd35ab6fd0d708144"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"3abed308b51252b413169f97693b298704c411ea","unresolved":false,"context_lines":[{"line_number":213,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix,"},{"line_number":214,"context_line":"                                             logger)"},{"line_number":215,"context_line":"    hybrid_logger \u003d LoggerStatsdFacade(logger, statsd)"},{"line_number":216,"context_line":"    return hybrid_logger"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"class InvalidHashPathConfigError(ValueError):"}],"source_content_type":"text/x-python","patch_set":37,"id":"5869a20f_6eedebf8","line":216,"in_reply_to":"cb0124bd_30b2e63f","updated":"2024-09-17 19:09:38.000000000","message":"Acknowledged","commit_id":"44c983f8f67710ac815554edd35ab6fd0d708144"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e4423839129427459f8851b2bc3ed58f09aa6390","unresolved":true,"context_lines":[{"line_number":226,"context_line":"def get_prefixed_logger(logger, prefix):"},{"line_number":227,"context_line":"    if isinstance(logger, LoggerStatsdFacade):"},{"line_number":228,"context_line":"        prefixed_logger \u003d PrefixLoggerAdapter(logger, {})"},{"line_number":229,"context_line":"        return LoggerStatsdFacade(prefixed_logger, statsd_client)"},{"line_number":230,"context_line":"    else:"},{"line_number":231,"context_line":"        return PrefixLoggerAdapter(logger, {})"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"12a13b44_358a8e17","line":229,"range":{"start_line":229,"start_character":51,"end_line":229,"end_character":64},"updated":"2024-09-17 18:03:58.000000000","message":"this is a module, think it might be meant to be ``logger.statsd_client``\n\nbut IDK why more tests didn\u0027t blow up - maybe add a unit test for get_prefixed_logger()??","commit_id":"44c983f8f67710ac815554edd35ab6fd0d708144"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"3abed308b51252b413169f97693b298704c411ea","unresolved":false,"context_lines":[{"line_number":226,"context_line":"def get_prefixed_logger(logger, prefix):"},{"line_number":227,"context_line":"    if isinstance(logger, LoggerStatsdFacade):"},{"line_number":228,"context_line":"        prefixed_logger \u003d PrefixLoggerAdapter(logger, {})"},{"line_number":229,"context_line":"        return LoggerStatsdFacade(prefixed_logger, statsd_client)"},{"line_number":230,"context_line":"    else:"},{"line_number":231,"context_line":"        return PrefixLoggerAdapter(logger, {})"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"aba516fa_f83c9dd3","line":229,"range":{"start_line":229,"start_character":51,"end_line":229,"end_character":64},"in_reply_to":"12a13b44_358a8e17","updated":"2024-09-17 19:09:38.000000000","message":"A lot of tests do not fail probably because of:\n\nIn class LoggerStatsdFacade:\nself.statsd_client \u003d statsd\nself.logger.statsd_client \u003d statsd\n\nI will write a unittest for statsd_client though.","commit_id":"44c983f8f67710ac815554edd35ab6fd0d708144"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"371d43e55eb849a0d0a3934f03357d737953902a","unresolved":true,"context_lines":[{"line_number":211,"context_line":"    if statsd_tail_prefix is None:"},{"line_number":212,"context_line":"        statsd_tail_prefix \u003d name"},{"line_number":213,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix,"},{"line_number":214,"context_line":"                                             logger.logger)"},{"line_number":215,"context_line":"    return LoggerStatsdFacade(logger, statsd)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"3b5dcea9_314b876f","line":214,"range":{"start_line":214,"start_character":45,"end_line":214,"end_character":58},"updated":"2024-09-18 12:36:40.000000000","message":"@Shreeya - I changed my mind on this, sorry!\n\nSo, it WAS the case that the StatsdClient was given an instance of Logger whereas get_logger returned a LogAdapter. Hence, in the proxy test_server.py, there is the assertion that the StatsdClient is init\u0027d with app.logger.logger.\n\nBut looking to the future, we expect to be writing:\n\n```\nlogger \u003d get_swift_logger(...)  # instance of LogAdapter\nstatsd_client \u003d get_statsd_client({}, logger\u003dlogger)\n```\n\nand we\u0027re not going to be thinking of writing\n\n```\nlogger \u003d get_swift_logger(...)  # instance of LogAdapter\nstatsd_client \u003d get_statsd_client({}, logger\u003dlogger.logger)  # equivalent to get_logger() on master\n```\n\nSo IMHO we should change the type of the StatsdClient logger now and start to live in the future.\n\ni.e. line 213 reverts to how you had it\n\n```\nstatsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix, logger)\n```\n\nand we fix the test assertions in test_server.p","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    if statsd_tail_prefix is None:"},{"line_number":212,"context_line":"        statsd_tail_prefix \u003d name"},{"line_number":213,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix,"},{"line_number":214,"context_line":"                                             logger.logger)"},{"line_number":215,"context_line":"    return LoggerStatsdFacade(logger, statsd)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"c9fc9c5f_6a9b3f9b","line":214,"range":{"start_line":214,"start_character":45,"end_line":214,"end_character":58},"in_reply_to":"3b5dcea9_314b876f","updated":"2024-09-23 19:08:03.000000000","message":"Acknowledged","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"371d43e55eb849a0d0a3934f03357d737953902a","unresolved":true,"context_lines":[{"line_number":215,"context_line":"    return LoggerStatsdFacade(logger, statsd)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"class InvalidHashPathConfigError(ValueError):"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def __str__(self):"},{"line_number":221,"context_line":"        return \"[swift-hash]: both swift_hash_path_suffix and \" \\"}],"source_content_type":"text/x-python","patch_set":38,"id":"352e5a28_49ee64be","line":218,"updated":"2024-09-18 12:36:40.000000000","message":"please move this class to line 297 so that it is adjacent to ``set_swift_dir`` etc - the InvalidHashPathConfigError that is currently sandwiched here is unrelated to logging","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d79d542ad98863b6fc2ae11559e41dc2e4901eda","unresolved":false,"context_lines":[{"line_number":215,"context_line":"    return LoggerStatsdFacade(logger, statsd)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"class InvalidHashPathConfigError(ValueError):"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def __str__(self):"},{"line_number":221,"context_line":"        return \"[swift-hash]: both swift_hash_path_suffix and \" \\"}],"source_content_type":"text/x-python","patch_set":38,"id":"958f7d86_2b51ac12","line":218,"in_reply_to":"352e5a28_49ee64be","updated":"2024-09-18 20:57:03.000000000","message":"Acknowledged","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":36606,"name":"Yan Xiao","display_name":"Yan","email":"yanxiao@nvidia.com","username":"yanxiao"},"change_message_id":"9df18dce512cf1ce44108f50dfed09ec976b331f","unresolved":true,"context_lines":[{"line_number":222,"context_line":"            \"swift_hash_path_prefix are missing from %s\" % SWIFT_CONF_FILE"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"def get_prefixed_logger(logger, prefix):"},{"line_number":226,"context_line":"    if isinstance(logger, LoggerStatsdFacade):"},{"line_number":227,"context_line":"        prefixed_logger \u003d PrefixLoggerAdapter(logger, {})"},{"line_number":228,"context_line":"        return LoggerStatsdFacade(prefixed_logger, logger.statsd_client)"}],"source_content_type":"text/x-python","patch_set":38,"id":"362de74c_b61352a7","line":225,"updated":"2024-09-17 19:56:38.000000000","message":"get_prefixed_logger seems a bit confusing, as it could return a hybrid logger, similar to get_logger API, while get_swift_logger does not. Would it be less confusing if the name is more distinct than get_swift_logger?","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            \"swift_hash_path_prefix are missing from %s\" % SWIFT_CONF_FILE"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"def get_prefixed_logger(logger, prefix):"},{"line_number":226,"context_line":"    if isinstance(logger, LoggerStatsdFacade):"},{"line_number":227,"context_line":"        prefixed_logger \u003d PrefixLoggerAdapter(logger, {})"},{"line_number":228,"context_line":"        return LoggerStatsdFacade(prefixed_logger, logger.statsd_client)"}],"source_content_type":"text/x-python","patch_set":38,"id":"0c7c6929_1b869e6a","line":225,"in_reply_to":"362de74c_b61352a7","updated":"2024-09-23 19:08:03.000000000","message":"Discussed on call","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":36606,"name":"Yan Xiao","display_name":"Yan","email":"yanxiao@nvidia.com","username":"yanxiao"},"change_message_id":"9df18dce512cf1ce44108f50dfed09ec976b331f","unresolved":true,"context_lines":[{"line_number":224,"context_line":""},{"line_number":225,"context_line":"def get_prefixed_logger(logger, prefix):"},{"line_number":226,"context_line":"    if isinstance(logger, LoggerStatsdFacade):"},{"line_number":227,"context_line":"        prefixed_logger \u003d PrefixLoggerAdapter(logger, {})"},{"line_number":228,"context_line":"        return LoggerStatsdFacade(prefixed_logger, logger.statsd_client)"},{"line_number":229,"context_line":"    else:"},{"line_number":230,"context_line":"        return PrefixLoggerAdapter(logger, {})"}],"source_content_type":"text/x-python","patch_set":38,"id":"7c131931_8f9aabc8","line":227,"updated":"2024-09-17 19:56:38.000000000","message":"seems would be easier to understand if use \"logger.logger\" here, even if either would work? as PrefixLoggerAdapter should really be an adapter for stdlib logger","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"371d43e55eb849a0d0a3934f03357d737953902a","unresolved":true,"context_lines":[{"line_number":224,"context_line":""},{"line_number":225,"context_line":"def get_prefixed_logger(logger, prefix):"},{"line_number":226,"context_line":"    if isinstance(logger, LoggerStatsdFacade):"},{"line_number":227,"context_line":"        prefixed_logger \u003d PrefixLoggerAdapter(logger, {})"},{"line_number":228,"context_line":"        return LoggerStatsdFacade(prefixed_logger, logger.statsd_client)"},{"line_number":229,"context_line":"    else:"},{"line_number":230,"context_line":"        return PrefixLoggerAdapter(logger, {})"}],"source_content_type":"text/x-python","patch_set":38,"id":"65dbcedc_564abf8f","line":227,"range":{"start_line":227,"start_character":46,"end_line":227,"end_character":52},"updated":"2024-09-18 12:36:40.000000000","message":"shouldn\u0027t this be ``logger._logger`` ? Might explain the weird ``logger\u003dlogger.logger`` in reconstructor","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d79d542ad98863b6fc2ae11559e41dc2e4901eda","unresolved":false,"context_lines":[{"line_number":224,"context_line":""},{"line_number":225,"context_line":"def get_prefixed_logger(logger, prefix):"},{"line_number":226,"context_line":"    if isinstance(logger, LoggerStatsdFacade):"},{"line_number":227,"context_line":"        prefixed_logger \u003d PrefixLoggerAdapter(logger, {})"},{"line_number":228,"context_line":"        return LoggerStatsdFacade(prefixed_logger, logger.statsd_client)"},{"line_number":229,"context_line":"    else:"},{"line_number":230,"context_line":"        return PrefixLoggerAdapter(logger, {})"}],"source_content_type":"text/x-python","patch_set":38,"id":"a3edbbed_3952cc5f","line":227,"range":{"start_line":227,"start_character":46,"end_line":227,"end_character":52},"in_reply_to":"65dbcedc_564abf8f","updated":"2024-09-18 20:57:03.000000000","message":"The weird logger\u003dlogger.logger in the reconstructor and replicator caused the prefix_logger test failures.","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":224,"context_line":""},{"line_number":225,"context_line":"def get_prefixed_logger(logger, prefix):"},{"line_number":226,"context_line":"    if isinstance(logger, LoggerStatsdFacade):"},{"line_number":227,"context_line":"        prefixed_logger \u003d PrefixLoggerAdapter(logger, {})"},{"line_number":228,"context_line":"        return LoggerStatsdFacade(prefixed_logger, logger.statsd_client)"},{"line_number":229,"context_line":"    else:"},{"line_number":230,"context_line":"        return PrefixLoggerAdapter(logger, {})"}],"source_content_type":"text/x-python","patch_set":38,"id":"4429a8b2_1f8e3028","line":227,"in_reply_to":"7c131931_8f9aabc8","updated":"2024-09-23 19:08:03.000000000","message":"Acknowledged","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"371d43e55eb849a0d0a3934f03357d737953902a","unresolved":true,"context_lines":[{"line_number":227,"context_line":"        prefixed_logger \u003d PrefixLoggerAdapter(logger, {})"},{"line_number":228,"context_line":"        return LoggerStatsdFacade(prefixed_logger, logger.statsd_client)"},{"line_number":229,"context_line":"    else:"},{"line_number":230,"context_line":"        return PrefixLoggerAdapter(logger, {})"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"class LoggerStatsdFacade(object):"}],"source_content_type":"text/x-python","patch_set":38,"id":"5da1a4bb_b065b033","line":230,"updated":"2024-09-18 12:36:40.000000000","message":"I\u0027m wondering if we should just avoid this altogether and in the places where a PrefixLoggerAdapter is used just stop using get_logger and move to new pattern of having a separate statsd_client attribute.","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        prefixed_logger \u003d PrefixLoggerAdapter(logger, {})"},{"line_number":228,"context_line":"        return LoggerStatsdFacade(prefixed_logger, logger.statsd_client)"},{"line_number":229,"context_line":"    else:"},{"line_number":230,"context_line":"        return PrefixLoggerAdapter(logger, {})"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"class LoggerStatsdFacade(object):"}],"source_content_type":"text/x-python","patch_set":38,"id":"16c5449a_5f15c9cc","line":230,"in_reply_to":"5da1a4bb_b065b033","updated":"2024-09-23 19:08:03.000000000","message":"Acknowledged","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ff7a7110b89e24a3c306141143185d6014e77ac1","unresolved":true,"context_lines":[{"line_number":242,"context_line":"    )"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def __init__(self, logger, statsd):"},{"line_number":245,"context_line":"        self._logger \u003d logger"},{"line_number":246,"context_line":"        self.statsd_client \u003d statsd"},{"line_number":247,"context_line":"        self.logger.statsd_client \u003d statsd"},{"line_number":248,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"641bcd6d_ff612107","line":245,"range":{"start_line":245,"start_character":13,"end_line":245,"end_character":20},"updated":"2024-09-18 12:41:38.000000000","message":"we might rename this ``swift_logger`` since it is the thing supplied from ``get_swift_logger``. The underscore\u0027d ``_logger`` implies it should not be accessed which may prove to be more restrictive than necessary, but we can\u0027t use just ``logger``.","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d79d542ad98863b6fc2ae11559e41dc2e4901eda","unresolved":false,"context_lines":[{"line_number":242,"context_line":"    )"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def __init__(self, logger, statsd):"},{"line_number":245,"context_line":"        self._logger \u003d logger"},{"line_number":246,"context_line":"        self.statsd_client \u003d statsd"},{"line_number":247,"context_line":"        self.logger.statsd_client \u003d statsd"},{"line_number":248,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"60cdcf06_8d50cacf","line":245,"range":{"start_line":245,"start_character":13,"end_line":245,"end_character":20},"in_reply_to":"641bcd6d_ff612107","updated":"2024-09-18 20:57:03.000000000","message":"Acknowledged","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":36606,"name":"Yan Xiao","display_name":"Yan","email":"yanxiao@nvidia.com","username":"yanxiao"},"change_message_id":"9df18dce512cf1ce44108f50dfed09ec976b331f","unresolved":true,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def __getattr__(self, name):"},{"line_number":250,"context_line":"        if name in self.STATSD_CLIENT_METHODS:"},{"line_number":251,"context_line":"            return getattr(self.logger.statsd_client, name)"},{"line_number":252,"context_line":"        return getattr(self._logger, name)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def set_statsd_prefix(self, prefix):"}],"source_content_type":"text/x-python","patch_set":38,"id":"5f93b4da_4aaad32c","line":251,"updated":"2024-09-17 19:56:38.000000000","message":"wonder how would this work with multiple statsd client instances i.e. labeled vs. non-labeled? probably not too much issue as the hybrid logger would only support non-labeled statsd client instance?","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def __getattr__(self, name):"},{"line_number":250,"context_line":"        if name in self.STATSD_CLIENT_METHODS:"},{"line_number":251,"context_line":"            return getattr(self.logger.statsd_client, name)"},{"line_number":252,"context_line":"        return getattr(self._logger, name)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def set_statsd_prefix(self, prefix):"}],"source_content_type":"text/x-python","patch_set":38,"id":"ff540b8c_0442065f","line":251,"in_reply_to":"5f93b4da_4aaad32c","updated":"2024-09-23 19:08:03.000000000","message":"Discussed on call","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"371d43e55eb849a0d0a3934f03357d737953902a","unresolved":true,"context_lines":[{"line_number":268,"context_line":"            DeprecationWarning, stacklevel\u003d2"},{"line_number":269,"context_line":"        )"},{"line_number":270,"context_line":"        if self.statsd_client:"},{"line_number":271,"context_line":"            self.statsd_client._set_prefix(prefix)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    @property"},{"line_number":274,"context_line":"    def txn_id(self):"}],"source_content_type":"text/x-python","patch_set":38,"id":"0d93078b_35b3227f","line":271,"updated":"2024-09-18 12:36:40.000000000","message":"ok, this has moved out of LogAdapter","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d79d542ad98863b6fc2ae11559e41dc2e4901eda","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            DeprecationWarning, stacklevel\u003d2"},{"line_number":269,"context_line":"        )"},{"line_number":270,"context_line":"        if self.statsd_client:"},{"line_number":271,"context_line":"            self.statsd_client._set_prefix(prefix)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    @property"},{"line_number":274,"context_line":"    def txn_id(self):"}],"source_content_type":"text/x-python","patch_set":38,"id":"cdecf501_2dd3c34e","line":271,"in_reply_to":"0d93078b_35b3227f","updated":"2024-09-18 20:57:03.000000000","message":"Acknowledged","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"371d43e55eb849a0d0a3934f03357d737953902a","unresolved":true,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"    @thread_locals.setter"},{"line_number":294,"context_line":"    def thread_locals(self, value):"},{"line_number":295,"context_line":"        self._logger.thread_locals \u003d value"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"def set_swift_dir(swift_dir):"}],"source_content_type":"text/x-python","patch_set":38,"id":"0ef0d96c_31fff5e8","line":295,"updated":"2024-09-18 12:36:40.000000000","message":"why are these method shims needed? would they not just be forwarded to the logger instance?\n\nupdate: it\u0027s because we don\u0027t have a __setattr__ to forward setters on to the wrapped instances. I got into all sorts of recursion problems implementing that, but ended up with something that seems to work...but I won\u0027t be surprised if there\u0027s a better way!\n\n```\nclass LoggerStatsdFacade(object):\n    __slots__ \u003d (\u0027_logger\u0027, \u0027statsd_client\u0027)\n\n    STATSD_CLIENT_METHODS \u003d (\n        \u0027update_stats\u0027,\n        \u0027increment\u0027,\n        \u0027decrement\u0027,\n        \u0027timing\u0027,\n        \u0027timing_since\u0027,\n        \u0027transfer_rate\u0027,\n    )\n\n    def __init__(self, logger, statsd):\n        self._logger \u003d logger\n        self.statsd_client \u003d statsd\n        self.logger.statsd_client \u003d statsd\n\n    def __getattr__(self, name):\n        if name in self.__slots__:\n            value \u003d super(LoggerStatsdFacade, self).__getattr__(name)\n        elif name in self.STATSD_CLIENT_METHODS:\n            value \u003d getattr(self.logger.statsd_client, name)\n        else:\n            value \u003d getattr(self._logger, name)\n        return value\n\n    def __setattr__(self, name, value):\n        if name in self.__slots__:\n            super(LoggerStatsdFacade, self).__setattr__(name, value)\n        elif name in self.STATSD_CLIENT_METHODS:\n            setattr(self.logger.statsd_client, name, value)\n        else:\n            setattr(self._logger, name, value)\n\n    def set_statsd_prefix(self, prefix):\n        \"\"\"\n        This method is deprecated. Callers should use the\n        ``tail_prefix`` argument of ``get_logger``\n        when instantiating a logger.\n\n        The StatsD client prefix defaults to the \"name\" of the logger.  This\n        method may override that default with a specific value.  Currently used\n        in the proxy-server to differentiate the Account, Container, and Object\n        controllers.\n        \"\"\"\n        warnings.warn(\n            \u0027set_statsd_prefix() is deprecated; use \u0027\n            \u0027the ``statsd_tail_prefix`` argument to ``get_logger`` instead.\u0027,\n            DeprecationWarning, stacklevel\u003d2\n        )\n        if self.statsd_client:\n            self.statsd_client._set_prefix(prefix)\n\n```","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5729f3cbe76ba61581108af9421cff766e6f025a","unresolved":true,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"    @thread_locals.setter"},{"line_number":294,"context_line":"    def thread_locals(self, value):"},{"line_number":295,"context_line":"        self._logger.thread_locals \u003d value"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"def set_swift_dir(swift_dir):"}],"source_content_type":"text/x-python","patch_set":38,"id":"3452eb2a_e31cd530","line":295,"in_reply_to":"0ef0d96c_31fff5e8","updated":"2024-09-19 15:59:26.000000000","message":"FWIW I probably wouldn\u0027t want to suggest that we should implement a `__setattr__` even if we could get it working it seems brittle; we never VERY little forwarding of attribute setting (in production code) and it\u0027s possible that we mostly end up writing code to make tests/mocks happy.\n\nBetter I think to just have the 3 explicit @property.setters where we have to forward them to logger.","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4d574a674c61558b69324bb320b26a9ca88fb392","unresolved":false,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"    @thread_locals.setter"},{"line_number":294,"context_line":"    def thread_locals(self, value):"},{"line_number":295,"context_line":"        self._logger.thread_locals \u003d value"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"def set_swift_dir(swift_dir):"}],"source_content_type":"text/x-python","patch_set":38,"id":"e128a621_c86fefbf","line":295,"in_reply_to":"3452eb2a_e31cd530","updated":"2024-09-30 14:42:40.000000000","message":"Acknowledged","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"25e6bf85ce3fb88b8abdfb2b6ac1d40662af5a44","unresolved":true,"context_lines":[{"line_number":255,"context_line":"        elif name in self.STATSD_CLIENT_METHODS:"},{"line_number":256,"context_line":"            delattr(self.logger.statsd_client, name)"},{"line_number":257,"context_line":"        else:"},{"line_number":258,"context_line":"            delattr(self._logger, name)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def set_statsd_prefix(self, prefix):"},{"line_number":261,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":40,"id":"7a8dd46b_e9fe252c","line":258,"updated":"2024-09-23 15:24:24.000000000","message":"maybe conslidate the \"in `__slots__`, in `STATSD`, else logger\" object lookup into `_select_object_for_name` or something like that.","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        elif name in self.STATSD_CLIENT_METHODS:"},{"line_number":256,"context_line":"            delattr(self.logger.statsd_client, name)"},{"line_number":257,"context_line":"        else:"},{"line_number":258,"context_line":"            delattr(self._logger, name)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def set_statsd_prefix(self, prefix):"},{"line_number":261,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":40,"id":"d8725310_71881911","line":258,"in_reply_to":"7a8dd46b_e9fe252c","updated":"2024-09-23 19:08:03.000000000","message":"Done","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"25e6bf85ce3fb88b8abdfb2b6ac1d40662af5a44","unresolved":true,"context_lines":[{"line_number":272,"context_line":"            \u0027set_statsd_prefix() is deprecated; use \u0027"},{"line_number":273,"context_line":"            \u0027the ``statsd_tail_prefix`` argument to ``get_logger`` instead.\u0027,"},{"line_number":274,"context_line":"            DeprecationWarning, stacklevel\u003d2"},{"line_number":275,"context_line":"        )"},{"line_number":276,"context_line":"        if self.statsd_client:"},{"line_number":277,"context_line":"            self.statsd_client._set_prefix(prefix)"},{"line_number":278,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"d7cfe40b_6227b59d","line":275,"updated":"2024-09-23 15:24:24.000000000","message":"what was the \"get_logger\" object interface for this method before we deprecated it?  Why can\u0027t this use the same double-und methods as the other statsd_client methods?","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            \u0027set_statsd_prefix() is deprecated; use \u0027"},{"line_number":273,"context_line":"            \u0027the ``statsd_tail_prefix`` argument to ``get_logger`` instead.\u0027,"},{"line_number":274,"context_line":"            DeprecationWarning, stacklevel\u003d2"},{"line_number":275,"context_line":"        )"},{"line_number":276,"context_line":"        if self.statsd_client:"},{"line_number":277,"context_line":"            self.statsd_client._set_prefix(prefix)"},{"line_number":278,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"a7f85e52_d70405a2","line":275,"in_reply_to":"d7cfe40b_6227b59d","updated":"2024-09-23 19:08:03.000000000","message":"Done","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"25e6bf85ce3fb88b8abdfb2b6ac1d40662af5a44","unresolved":true,"context_lines":[{"line_number":273,"context_line":"            \u0027the ``statsd_tail_prefix`` argument to ``get_logger`` instead.\u0027,"},{"line_number":274,"context_line":"            DeprecationWarning, stacklevel\u003d2"},{"line_number":275,"context_line":"        )"},{"line_number":276,"context_line":"        if self.statsd_client:"},{"line_number":277,"context_line":"            self.statsd_client._set_prefix(prefix)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"a7943599_16371152","line":276,"updated":"2024-09-23 15:24:24.000000000","message":"It\u0027s confusing/surprising that this is needed here, but not in attr lookup methods?","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            \u0027the ``statsd_tail_prefix`` argument to ``get_logger`` instead.\u0027,"},{"line_number":274,"context_line":"            DeprecationWarning, stacklevel\u003d2"},{"line_number":275,"context_line":"        )"},{"line_number":276,"context_line":"        if self.statsd_client:"},{"line_number":277,"context_line":"            self.statsd_client._set_prefix(prefix)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"e25f689a_7dc560cf","line":276,"in_reply_to":"a7943599_16371152","updated":"2024-09-23 19:08:03.000000000","message":"Done","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"fca9ec8d6734d516d63f0627028d18f48e85e972","unresolved":false,"context_lines":[{"line_number":209,"context_line":"    if statsd_tail_prefix is None:"},{"line_number":210,"context_line":"        statsd_tail_prefix \u003d name"},{"line_number":211,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf, statsd_tail_prefix,"},{"line_number":212,"context_line":"                                             logger.logger)"},{"line_number":213,"context_line":"    return LoggerStatsdFacade(logger, statsd)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"83d1291e_54df4a26","line":212,"updated":"2024-09-30 18:08:05.000000000","message":"this is strange; why wouldn\u0027t we want to pass the adapted logger to StatsdClient; does this mean that stuff like txid would be missing from statsd log message if it needed to do any logging?","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a3a37fa36504001bf9e6cfe48ed0c681a3c4885f","unresolved":true,"context_lines":[{"line_number":230,"context_line":"    def __init__(self, logger, statsd):"},{"line_number":231,"context_line":"        self.swift_logger \u003d logger"},{"line_number":232,"context_line":"        self.statsd_client \u003d statsd"},{"line_number":233,"context_line":"        self.logger.statsd_client \u003d statsd"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def __getattr__(self, name):"},{"line_number":236,"context_line":"        if name in self.__slots__:"}],"source_content_type":"text/x-python","patch_set":42,"id":"8580bc08_3746b5d0","line":233,"updated":"2024-09-25 15:58:20.000000000","message":"When does this object grow a logger attribute!?  Are we using `__getattr__` to pull the logger off the swift_logger!?  Plase don\u0027t.","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"6bb9e05a640f06482e771f1236a2e5f0b81ee7e9","unresolved":false,"context_lines":[{"line_number":230,"context_line":"    def __init__(self, logger, statsd):"},{"line_number":231,"context_line":"        self.swift_logger \u003d logger"},{"line_number":232,"context_line":"        self.statsd_client \u003d statsd"},{"line_number":233,"context_line":"        self.logger.statsd_client \u003d statsd"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def __getattr__(self, name):"},{"line_number":236,"context_line":"        if name in self.__slots__:"}],"source_content_type":"text/x-python","patch_set":42,"id":"7a3a758a_a4bac999","line":233,"in_reply_to":"8580bc08_3746b5d0","updated":"2024-09-26 18:29:22.000000000","message":"Removed __getattr__ to use logger.statsd_client. \nself.logger.statsd_client \u003d statsd however is needed for many test failures (mostly logger does not have a statsd_client but logger.logger has a statsd_client)","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"94ba6197988861b3d78e634b05a38cb43d7ad7ba","unresolved":true,"context_lines":[{"line_number":300,"context_line":"    return False"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"class InvalidHashPathConfigError(ValueError):"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    def __str__(self):"},{"line_number":306,"context_line":"        return \"[swift-hash]: both swift_hash_path_suffix and \" \\"}],"source_content_type":"text/x-python","patch_set":42,"id":"42232e7a_14bad968","line":303,"updated":"2024-09-24 17:12:25.000000000","message":"if this class is put at line 278 then it won\u0027t show as a diff","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"48236fbac3b8bcf6c79874284013d17f50792120","unresolved":false,"context_lines":[{"line_number":300,"context_line":"    return False"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"class InvalidHashPathConfigError(ValueError):"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    def __str__(self):"},{"line_number":306,"context_line":"        return \"[swift-hash]: both swift_hash_path_suffix and \" \\"}],"source_content_type":"text/x-python","patch_set":42,"id":"e6654ff7_e04440f6","line":303,"in_reply_to":"42232e7a_14bad968","updated":"2024-09-26 13:26:42.000000000","message":"Yes, you had suggested the move down here since all the Logger functions would be next to each other. And I agree, this is not much related to our change and hence better left out of the messy diff.","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"fca9ec8d6734d516d63f0627028d18f48e85e972","unresolved":true,"context_lines":[{"line_number":202,"context_line":"# transfers this will still cut off the transfer after the first chunk."},{"line_number":203,"context_line":"DEFAULT_DRAIN_LIMIT \u003d 65536"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"# JANKY AF, used to maintain bug-for-bug compat with old get_logger behavior"},{"line_number":206,"context_line":"_FACADE_GLOBAL_LOG_ROUTE_TO_STATSD_CLIENTS \u003d collections.defaultdict(list)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":45,"id":"cb8a4f72_e8305b65","line":205,"updated":"2024-09-30 18:08:05.000000000","message":"we should re-word this comment before we merge","commit_id":"528b24489517a01fb924cd989c7a6617f7a7a858"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d4599d5a72512155a8c56c5471b43f7105f6fa0b","unresolved":false,"context_lines":[{"line_number":202,"context_line":"# transfers this will still cut off the transfer after the first chunk."},{"line_number":203,"context_line":"DEFAULT_DRAIN_LIMIT \u003d 65536"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"# JANKY AF, used to maintain bug-for-bug compat with old get_logger behavior"},{"line_number":206,"context_line":"_FACADE_GLOBAL_LOG_ROUTE_TO_STATSD_CLIENTS \u003d collections.defaultdict(list)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":45,"id":"32ddec2f_ccddce21","line":205,"in_reply_to":"cb8a4f72_e8305b65","updated":"2024-10-01 14:16:34.000000000","message":"Acknowledged","commit_id":"528b24489517a01fb924cd989c7a6617f7a7a858"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"fca9ec8d6734d516d63f0627028d18f48e85e972","unresolved":true,"context_lines":[{"line_number":212,"context_line":"    for other_statsd in _FACADE_GLOBAL_LOG_ROUTE_TO_STATSD_CLIENTS[route]:"},{"line_number":213,"context_line":"        if other_statsd \u003d\u003d statsd:"},{"line_number":214,"context_line":"            continue"},{"line_number":215,"context_line":"        other_statsd._prefix \u003d statsd._prefix"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"def get_logger(conf, name\u003dNone, log_to_console\u003dFalse, log_route\u003dNone,"}],"source_content_type":"text/x-python","patch_set":45,"id":"9d82494e_555a13c4","line":215,"updated":"2024-09-30 18:08:05.000000000","message":"this function should be renamed to indicate this mutation","commit_id":"528b24489517a01fb924cd989c7a6617f7a7a858"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d4599d5a72512155a8c56c5471b43f7105f6fa0b","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    for other_statsd in _FACADE_GLOBAL_LOG_ROUTE_TO_STATSD_CLIENTS[route]:"},{"line_number":213,"context_line":"        if other_statsd \u003d\u003d statsd:"},{"line_number":214,"context_line":"            continue"},{"line_number":215,"context_line":"        other_statsd._prefix \u003d statsd._prefix"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"def get_logger(conf, name\u003dNone, log_to_console\u003dFalse, log_route\u003dNone,"}],"source_content_type":"text/x-python","patch_set":45,"id":"e4d0b406_0a6c1496","line":215,"in_reply_to":"9d82494e_555a13c4","updated":"2024-10-01 14:16:34.000000000","message":"Acknowledged","commit_id":"528b24489517a01fb924cd989c7a6617f7a7a858"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"fca9ec8d6734d516d63f0627028d18f48e85e972","unresolved":true,"context_lines":[{"line_number":264,"context_line":"                value \u003d getattr(self.swift_logger, name)"},{"line_number":265,"context_line":"            except AttributeError:"},{"line_number":266,"context_line":"                value \u003d getattr(self.swift_logger.logger, name)"},{"line_number":267,"context_line":"        return value"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def set_statsd_prefix(self, prefix):"},{"line_number":270,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":45,"id":"ee8db253_4265a192","line":267,"updated":"2024-09-30 18:08:05.000000000","message":"this would be the first dynamic attribute lookup I\u0027d want to get rid of in a follow-on change\n\nI think eventually if we want to stick with Facade \"has-a\" logger: it would be better if all attribute access ont he facade object was explicit\n\nOtherwise, the facade object should actually adopt an \"is-a SwiftLogAdapter\" interface instead of just pretending to be one with a dynamic `__getattr__` proxy","commit_id":"528b24489517a01fb924cd989c7a6617f7a7a858"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d4599d5a72512155a8c56c5471b43f7105f6fa0b","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                value \u003d getattr(self.swift_logger, name)"},{"line_number":265,"context_line":"            except AttributeError:"},{"line_number":266,"context_line":"                value \u003d getattr(self.swift_logger.logger, name)"},{"line_number":267,"context_line":"        return value"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def set_statsd_prefix(self, prefix):"},{"line_number":270,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":45,"id":"3c1ebf33_fb282d6a","line":267,"in_reply_to":"ee8db253_4265a192","updated":"2024-10-01 14:16:34.000000000","message":"Acknowledged","commit_id":"528b24489517a01fb924cd989c7a6617f7a7a858"}],"swift/common/utils/logs.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":624,"context_line":"        log_statsd_port \u003d 8125"},{"line_number":625,"context_line":"        log_statsd_default_sample_rate \u003d 1.0"},{"line_number":626,"context_line":"        log_statsd_sample_rate_factor \u003d 1.0"},{"line_number":627,"context_line":"        log_statsd_metric_prefix \u003d (empty-string)"},{"line_number":628,"context_line":""},{"line_number":629,"context_line":"    :param conf: Configuration dict to read settings from"},{"line_number":630,"context_line":"    :param name: This value is used to populate the ``server`` field in the log"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6e0032_6dfc18da","side":"PARENT","line":627,"updated":"2024-05-02 19:13:15.000000000","message":"I think this is good to remove this duplication of configuration documentation from the docstring of this method.","commit_id":"348d19142eb144fd5aaae99db08bda27391abec8"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"6b1b46e6cdf0885d74878e75664114e80de3ec5d","unresolved":false,"context_lines":[{"line_number":624,"context_line":"        log_statsd_port \u003d 8125"},{"line_number":625,"context_line":"        log_statsd_default_sample_rate \u003d 1.0"},{"line_number":626,"context_line":"        log_statsd_sample_rate_factor \u003d 1.0"},{"line_number":627,"context_line":"        log_statsd_metric_prefix \u003d (empty-string)"},{"line_number":628,"context_line":""},{"line_number":629,"context_line":"    :param conf: Configuration dict to read settings from"},{"line_number":630,"context_line":"    :param name: This value is used to populate the ``server`` field in the log"}],"source_content_type":"text/x-python","patch_set":6,"id":"61374578_1002c3c2","side":"PARENT","line":627,"in_reply_to":"fa6e0032_6dfc18da","updated":"2024-05-07 20:18:42.000000000","message":"Acknowledged","commit_id":"348d19142eb144fd5aaae99db08bda27391abec8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":32,"context_line":"import six"},{"line_number":33,"context_line":"import datetime"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"from six.moves.urllib.parse import quote"},{"line_number":36,"context_line":"from swift.common.utils.timestamp import UTC"},{"line_number":37,"context_line":"from swift.common.utils.config import config_true_value"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"99ad235f_646dcaec","line":35,"updated":"2024-05-02 19:13:15.000000000","message":"maybe `from six.moves.urllib import parse as urllib_parse`","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"6b1b46e6cdf0885d74878e75664114e80de3ec5d","unresolved":false,"context_lines":[{"line_number":32,"context_line":"import six"},{"line_number":33,"context_line":"import datetime"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"from six.moves.urllib.parse import quote"},{"line_number":36,"context_line":"from swift.common.utils.timestamp import UTC"},{"line_number":37,"context_line":"from swift.common.utils.config import config_true_value"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"97ed7d99_61aa1b42","line":35,"in_reply_to":"99ad235f_646dcaec","updated":"2024-05-07 20:18:42.000000000","message":"Acknowledged","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":635,"context_line":"    :param fmt: Override log format"},{"line_number":636,"context_line":"    :param statsd_tail_prefix: tail prefix to pass to statsd client; if None"},{"line_number":637,"context_line":"        then the tail prefix defaults to the value of ``name``."},{"line_number":638,"context_line":"    :return: an instance of ``LogAdapter``"},{"line_number":639,"context_line":"    \"\"\""},{"line_number":640,"context_line":"    # note: log_name is typically specified in conf (i.e. defined by"},{"line_number":641,"context_line":"    # operators), whereas log_route is typically hard-coded in callers of"}],"source_content_type":"text/x-python","patch_set":6,"id":"c8e0bcdc_6ad1464e","line":638,"updated":"2024-05-02 19:13:15.000000000","message":"I guess currently it\u0027s well understood that a LogAdapter will have a StatsdClient interface as well as it\u0027s Logger interface?","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"054d1fde17e13a9824e9319c72a05b94b4bccdc2","unresolved":false,"context_lines":[{"line_number":635,"context_line":"    :param fmt: Override log format"},{"line_number":636,"context_line":"    :param statsd_tail_prefix: tail prefix to pass to statsd client; if None"},{"line_number":637,"context_line":"        then the tail prefix defaults to the value of ``name``."},{"line_number":638,"context_line":"    :return: an instance of ``LogAdapter``"},{"line_number":639,"context_line":"    \"\"\""},{"line_number":640,"context_line":"    # note: log_name is typically specified in conf (i.e. defined by"},{"line_number":641,"context_line":"    # operators), whereas log_route is typically hard-coded in callers of"}],"source_content_type":"text/x-python","patch_set":6,"id":"d468e237_29fe42e9","line":638,"in_reply_to":"c8e0bcdc_6ad1464e","updated":"2024-05-29 19:23:29.000000000","message":"Acknowledged","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":1006,"context_line":"        else:"},{"line_number":1007,"context_line":"            log \u003d super(LogStringFormatter, self).format_field(value, spec)"},{"line_number":1008,"context_line":"            if self.quote:"},{"line_number":1009,"context_line":"                return six.moves.urllib.parse.quote(log, \u0027:/{}\u0027)"},{"line_number":1010,"context_line":"            else:"},{"line_number":1011,"context_line":"                return log"},{"line_number":1012,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"f81d886f_0adfac27","line":1009,"updated":"2024-05-02 19:13:15.000000000","message":"I assume this change has something to do with mocking?\n\nI think we import `quote` at the top - so it\u0027s a little weird to use the fully qualified name here; maybe `urllib_parse.quote`???","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"6b1b46e6cdf0885d74878e75664114e80de3ec5d","unresolved":false,"context_lines":[{"line_number":1006,"context_line":"        else:"},{"line_number":1007,"context_line":"            log \u003d super(LogStringFormatter, self).format_field(value, spec)"},{"line_number":1008,"context_line":"            if self.quote:"},{"line_number":1009,"context_line":"                return six.moves.urllib.parse.quote(log, \u0027:/{}\u0027)"},{"line_number":1010,"context_line":"            else:"},{"line_number":1011,"context_line":"                return log"},{"line_number":1012,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5cafaef1_f02b7263","line":1009,"in_reply_to":"f81d886f_0adfac27","updated":"2024-05-07 20:18:42.000000000","message":"I think there was a vtox error, let me check it again with the next patch if that\u0027s still the case.","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4fd5bf86ceac8042a8dc49a385a66e740e08d9a9","unresolved":true,"context_lines":[{"line_number":975,"context_line":"        else:"},{"line_number":976,"context_line":"            log \u003d super(LogStringFormatter, self).format_field(value, spec)"},{"line_number":977,"context_line":"            if self.quote:"},{"line_number":978,"context_line":"                return urllib_parse.quote(log, \u0027:/{}\u0027)"},{"line_number":979,"context_line":"            else:"},{"line_number":980,"context_line":"                return log"}],"source_content_type":"text/x-python","patch_set":8,"id":"2433ecdd_7eefd673","line":978,"updated":"2024-05-08 16:35:59.000000000","message":"Why\u0027d we change the quoter?","commit_id":"3681cf2315de5327f699942aa47be9899fab3955"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2537e9aa48141f3aa166af3f18f7e855ea1a8cea","unresolved":true,"context_lines":[{"line_number":975,"context_line":"        else:"},{"line_number":976,"context_line":"            log \u003d super(LogStringFormatter, self).format_field(value, spec)"},{"line_number":977,"context_line":"            if self.quote:"},{"line_number":978,"context_line":"                return urllib_parse.quote(log, \u0027:/{}\u0027)"},{"line_number":979,"context_line":"            else:"},{"line_number":980,"context_line":"                return log"}],"source_content_type":"text/x-python","patch_set":8,"id":"71e7a8f3_17e5a2f1","line":978,"in_reply_to":"19ad4bdd_50b2f37b","updated":"2024-05-08 19:22:44.000000000","message":"After applying\n```\ndiff --git a/swift/common/utils/logs.py b/swift/common/utils/logs.py\nindex 0f30bf50b..5fb99cae1 100644\n--- a/swift/common/utils/logs.py\n+++ b/swift/common/utils/logs.py\n@@ -32,7 +32,6 @@ import eventlet\n import six\n import datetime\n \n-from six.moves.urllib import parse as urllib_parse\n from swift.common.utils.base import md5, quote, split_path\n from swift.common.utils.timestamp import UTC\n from swift.common.utils.config import config_true_value\n@@ -975,6 +974,6 @@ class LogStringFormatter(string.Formatter):\n         else:\n             log \u003d super(LogStringFormatter, self).format_field(value, spec)\n             if self.quote:\n-                return urllib_parse.quote(log, \u0027:/{}\u0027)\n+                return quote(log, \u0027:/{}\u0027)\n             else:\n                 return log\n```\ntests still pass for me. I\u0027m pretty sure this change is what\u0027s causing the py2 test failures.","commit_id":"3681cf2315de5327f699942aa47be9899fab3955"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"1ec3bd9742496b066db22aa85fa2c225fd2dd5d9","unresolved":true,"context_lines":[{"line_number":975,"context_line":"        else:"},{"line_number":976,"context_line":"            log \u003d super(LogStringFormatter, self).format_field(value, spec)"},{"line_number":977,"context_line":"            if self.quote:"},{"line_number":978,"context_line":"                return urllib_parse.quote(log, \u0027:/{}\u0027)"},{"line_number":979,"context_line":"            else:"},{"line_number":980,"context_line":"                return log"}],"source_content_type":"text/x-python","patch_set":8,"id":"19ad4bdd_50b2f37b","line":978,"in_reply_to":"2433ecdd_7eefd673","updated":"2024-05-08 16:58:03.000000000","message":"https://review.opendev.org/c/openstack/swift/+/915483/comment/f81d886f_0adfac27/","commit_id":"3681cf2315de5327f699942aa47be9899fab3955"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"a6d8825cee65f8ab0edfd5ee0ae7feda341602df","unresolved":false,"context_lines":[{"line_number":975,"context_line":"        else:"},{"line_number":976,"context_line":"            log \u003d super(LogStringFormatter, self).format_field(value, spec)"},{"line_number":977,"context_line":"            if self.quote:"},{"line_number":978,"context_line":"                return urllib_parse.quote(log, \u0027:/{}\u0027)"},{"line_number":979,"context_line":"            else:"},{"line_number":980,"context_line":"                return log"}],"source_content_type":"text/x-python","patch_set":8,"id":"40f0c7cb_2c93a232","line":978,"in_reply_to":"71e7a8f3_17e5a2f1","updated":"2024-05-08 19:37:57.000000000","message":"Ah, okay. reverting back! Thanks!","commit_id":"3681cf2315de5327f699942aa47be9899fab3955"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"97329e3781de638d4de05cb15acb7fa84841c65e","unresolved":true,"context_lines":[{"line_number":974,"context_line":"        else:"},{"line_number":975,"context_line":"            log \u003d super(LogStringFormatter, self).format_field(value, spec)"},{"line_number":976,"context_line":"            if self.quote:"},{"line_number":977,"context_line":"                return six.moves.urllib.parse.quote(log, \u0027:/{}\u0027)"},{"line_number":978,"context_line":"            else:"},{"line_number":979,"context_line":"                return log"}],"source_content_type":"text/x-python","patch_set":9,"id":"7069434a_932cfeb1","line":977,"updated":"2024-05-09 21:34:07.000000000","message":"Nah, we want to go all the way back to just plain `quote` (which we\u0027ve already got imported from `swift.common.utils.base` and flake8 is complaining that we aren\u0027t using).","commit_id":"c3dd5c05aae156e57b7c32de6362fb49aeeea0db"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"96617618d6579c1cb50617d7c8f2d3a1bb415673","unresolved":false,"context_lines":[{"line_number":974,"context_line":"        else:"},{"line_number":975,"context_line":"            log \u003d super(LogStringFormatter, self).format_field(value, spec)"},{"line_number":976,"context_line":"            if self.quote:"},{"line_number":977,"context_line":"                return six.moves.urllib.parse.quote(log, \u0027:/{}\u0027)"},{"line_number":978,"context_line":"            else:"},{"line_number":979,"context_line":"                return log"}],"source_content_type":"text/x-python","patch_set":9,"id":"4a2126b5_edc3eb20","line":977,"in_reply_to":"7069434a_932cfeb1","updated":"2024-05-12 18:30:49.000000000","message":"Acknowledged","commit_id":"c3dd5c05aae156e57b7c32de6362fb49aeeea0db"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb5a2b7ee08b9b19c5f8445f15074c4c030b6d99","unresolved":true,"context_lines":[{"line_number":410,"context_line":"    decrement \u003d statsd_delegate(\u0027decrement\u0027)"},{"line_number":411,"context_line":"    timing \u003d statsd_delegate(\u0027timing\u0027)"},{"line_number":412,"context_line":"    timing_since \u003d statsd_delegate(\u0027timing_since\u0027)"},{"line_number":413,"context_line":"    transfer_rate \u003d statsd_delegate(\u0027transfer_rate\u0027)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"class SwiftLogFormatter(logging.Formatter):"}],"source_content_type":"text/x-python","patch_set":10,"id":"045a6f41_38858763","line":413,"updated":"2024-05-15 18:00:52.000000000","message":"all of this should go away - the goal is to remove references to statsd from the logging module","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ed9c95505b7a3d793654ecc8617060c8d244b6a3","unresolved":false,"context_lines":[{"line_number":410,"context_line":"    decrement \u003d statsd_delegate(\u0027decrement\u0027)"},{"line_number":411,"context_line":"    timing \u003d statsd_delegate(\u0027timing\u0027)"},{"line_number":412,"context_line":"    timing_since \u003d statsd_delegate(\u0027timing_since\u0027)"},{"line_number":413,"context_line":"    transfer_rate \u003d statsd_delegate(\u0027transfer_rate\u0027)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"class SwiftLogFormatter(logging.Formatter):"}],"source_content_type":"text/x-python","patch_set":10,"id":"dbd6c33e_0bbd6bc0","line":413,"in_reply_to":"045a6f41_38858763","updated":"2024-05-29 19:21:39.000000000","message":"Acknowledged","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f9144d22bb17023f0a92bddf5cb0fc354a4d6c0d","unresolved":true,"context_lines":[{"line_number":633,"context_line":""},{"line_number":634,"context_line":""},{"line_number":635,"context_line":"def get_adapted_logger(conf, name\u003dNone, log_to_console\u003dFalse, log_route\u003dNone,"},{"line_number":636,"context_line":"                       fmt\u003d\"%(server)s: %(message)s\", statsd_tail_prefix\u003dNone):"},{"line_number":637,"context_line":"    \"\"\""},{"line_number":638,"context_line":"    Get the current system logger using config settings."},{"line_number":639,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"913e88a0_85ff5180","line":636,"updated":"2024-05-15 16:51:04.000000000","message":"I think it is worrying that this function\u0027s name could change with only one unit test change test_capture_stdio\n\nI guess that\u0027s because out tests are all still using utils.get_logger. I think that we need to catch up with logs.get_logger being the primary interface to get a logger and be testing that.","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4b0ce629e546c5d589c103c11336480d3c155303","unresolved":false,"context_lines":[{"line_number":633,"context_line":""},{"line_number":634,"context_line":""},{"line_number":635,"context_line":"def get_adapted_logger(conf, name\u003dNone, log_to_console\u003dFalse, log_route\u003dNone,"},{"line_number":636,"context_line":"                       fmt\u003d\"%(server)s: %(message)s\", statsd_tail_prefix\u003dNone):"},{"line_number":637,"context_line":"    \"\"\""},{"line_number":638,"context_line":"    Get the current system logger using config settings."},{"line_number":639,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"cd602d43_c82726b9","line":636,"in_reply_to":"913e88a0_85ff5180","updated":"2024-06-03 23:54:41.000000000","message":"Acknowledged","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb5a2b7ee08b9b19c5f8445f15074c4c030b6d99","unresolved":true,"context_lines":[{"line_number":735,"context_line":"    if statsd_tail_prefix is None:"},{"line_number":736,"context_line":"        statsd_tail_prefix \u003d name"},{"line_number":737,"context_line":"    logger.statsd_client \u003d statsd_client.get_statsd_client("},{"line_number":738,"context_line":"        conf, statsd_tail_prefix, logger)"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"    adapted_logger \u003d LogAdapter(logger, name)"},{"line_number":741,"context_line":"    other_handlers \u003d conf.get(\u0027log_custom_handlers\u0027, None)"}],"source_content_type":"text/x-python","patch_set":10,"id":"8f60df4a_ccf07fdf","line":738,"updated":"2024-05-15 18:00:52.000000000","message":"The call to get_statsd_client shouldn\u0027t exist in get_adapted_logger\n\nThe goal of \"logs.get_adpated_logger\" is to make a *new* interface that *only* returns a logger-like object with no statsd_client shims on it.","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"054d1fde17e13a9824e9319c72a05b94b4bccdc2","unresolved":false,"context_lines":[{"line_number":735,"context_line":"    if statsd_tail_prefix is None:"},{"line_number":736,"context_line":"        statsd_tail_prefix \u003d name"},{"line_number":737,"context_line":"    logger.statsd_client \u003d statsd_client.get_statsd_client("},{"line_number":738,"context_line":"        conf, statsd_tail_prefix, logger)"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"    adapted_logger \u003d LogAdapter(logger, name)"},{"line_number":741,"context_line":"    other_handlers \u003d conf.get(\u0027log_custom_handlers\u0027, None)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9dc69428_b0644fd3","line":738,"in_reply_to":"8f60df4a_ccf07fdf","updated":"2024-05-29 19:23:29.000000000","message":"Acknowledged","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"387075012855054d0b86ef693856d024aedde11a","unresolved":true,"context_lines":[{"line_number":495,"context_line":"        return self"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"class SwiftLoggerAdapter(logging.LoggerAdapter):"},{"line_number":499,"context_line":"    \"\"\""},{"line_number":500,"context_line":"    A logging.LoggerAdapter subclass that also passes through StatsD method"},{"line_number":501,"context_line":"    calls."}],"source_content_type":"text/x-python","patch_set":14,"id":"90951900_c4733276","line":498,"updated":"2024-06-04 00:46:01.000000000","message":"I wonder: do we still need this?","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4a6f5f4651df64772f0db2993f6dfcab3f425698","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        return self"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"class SwiftLoggerAdapter(logging.LoggerAdapter):"},{"line_number":499,"context_line":"    \"\"\""},{"line_number":500,"context_line":"    A logging.LoggerAdapter subclass that also passes through StatsD method"},{"line_number":501,"context_line":"    calls."}],"source_content_type":"text/x-python","patch_set":14,"id":"f1e66114_d289c7e5","line":498,"in_reply_to":"00690181_0d0011f7","updated":"2024-06-07 22:37:55.000000000","message":"Done","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"9267720323df2f9cc43cbe1cc4b161e8c7376520","unresolved":true,"context_lines":[{"line_number":495,"context_line":"        return self"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"class SwiftLoggerAdapter(logging.LoggerAdapter):"},{"line_number":499,"context_line":"    \"\"\""},{"line_number":500,"context_line":"    A logging.LoggerAdapter subclass that also passes through StatsD method"},{"line_number":501,"context_line":"    calls."}],"source_content_type":"text/x-python","patch_set":14,"id":"00690181_0d0011f7","line":498,"in_reply_to":"90951900_c4733276","updated":"2024-06-05 20:14:42.000000000","message":"A lot of unittests call PrefixLoggerAdapter and subsequently SwiftLoggerAdapter. Maybe removing this in a followup patch and fixing the failing tests is a good idea?","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"387075012855054d0b86ef693856d024aedde11a","unresolved":true,"context_lines":[{"line_number":541,"context_line":"        self.logger.exception(msg, *a, **kw)"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"class PrefixLoggerAdapter(SwiftLoggerAdapter):"},{"line_number":545,"context_line":"    \"\"\""},{"line_number":546,"context_line":"    Adds an optional prefix to all its log messages. When the prefix has not"},{"line_number":547,"context_line":"    been set, messages are unchanged."}],"source_content_type":"text/x-python","patch_set":14,"id":"147b2d64_b322f0bb","line":544,"updated":"2024-06-04 00:46:01.000000000","message":"Now *this* definitely *does* see some use -- I forget how stats interacts with it, though.","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4a6f5f4651df64772f0db2993f6dfcab3f425698","unresolved":false,"context_lines":[{"line_number":541,"context_line":"        self.logger.exception(msg, *a, **kw)"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"class PrefixLoggerAdapter(SwiftLoggerAdapter):"},{"line_number":545,"context_line":"    \"\"\""},{"line_number":546,"context_line":"    Adds an optional prefix to all its log messages. When the prefix has not"},{"line_number":547,"context_line":"    been set, messages are unchanged."}],"source_content_type":"text/x-python","patch_set":14,"id":"dbb3f62c_85cb548c","line":544,"in_reply_to":"147b2d64_b322f0bb","updated":"2024-06-07 22:37:55.000000000","message":"Done","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"387075012855054d0b86ef693856d024aedde11a","unresolved":true,"context_lines":[{"line_number":583,"context_line":""},{"line_number":584,"context_line":""},{"line_number":585,"context_line":"def get_adapted_logger(conf, name\u003dNone, log_to_console\u003dFalse, log_route\u003dNone,"},{"line_number":586,"context_line":"                       fmt\u003d\"%(server)s: %(message)s\", statsd_tail_prefix\u003dNone):"},{"line_number":587,"context_line":"    \"\"\""},{"line_number":588,"context_line":"    Get the current system logger using config settings."},{"line_number":589,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"40cb75a3_64ab5187","line":586,"range":{"start_line":586,"start_character":54,"end_line":586,"end_character":72},"updated":"2024-06-04 00:46:01.000000000","message":"Do we really still need to accept this any more? We don\u0027t use it. Then we could also get it out of the docstring.","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"9267720323df2f9cc43cbe1cc4b161e8c7376520","unresolved":false,"context_lines":[{"line_number":583,"context_line":""},{"line_number":584,"context_line":""},{"line_number":585,"context_line":"def get_adapted_logger(conf, name\u003dNone, log_to_console\u003dFalse, log_route\u003dNone,"},{"line_number":586,"context_line":"                       fmt\u003d\"%(server)s: %(message)s\", statsd_tail_prefix\u003dNone):"},{"line_number":587,"context_line":"    \"\"\""},{"line_number":588,"context_line":"    Get the current system logger using config settings."},{"line_number":589,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"6eac82db_6071d70e","line":586,"range":{"start_line":586,"start_character":54,"end_line":586,"end_character":72},"in_reply_to":"40cb75a3_64ab5187","updated":"2024-06-05 20:14:42.000000000","message":"Agree","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"387075012855054d0b86ef693856d024aedde11a","unresolved":true,"context_lines":[{"line_number":599,"context_line":""},{"line_number":600,"context_line":"    :param conf: Configuration dict to read settings from"},{"line_number":601,"context_line":"    :param name: This value is used to populate the ``server`` field in the log"},{"line_number":602,"context_line":"                 format, as the prefix for statsd messages, and as the default"},{"line_number":603,"context_line":"                 value for ``log_route``; defaults to the ``log_name`` value in"},{"line_number":604,"context_line":"                 ``conf``, if it exists, or to \u0027swift\u0027."},{"line_number":605,"context_line":"    :param log_to_console: Add handler which writes to console on stderr"}],"source_content_type":"text/x-python","patch_set":14,"id":"878ee815_6bb80e46","line":602,"range":{"start_line":602,"start_character":25,"end_line":602,"end_character":58},"updated":"2024-06-04 00:46:01.000000000","message":"Should drop.","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"9267720323df2f9cc43cbe1cc4b161e8c7376520","unresolved":false,"context_lines":[{"line_number":599,"context_line":""},{"line_number":600,"context_line":"    :param conf: Configuration dict to read settings from"},{"line_number":601,"context_line":"    :param name: This value is used to populate the ``server`` field in the log"},{"line_number":602,"context_line":"                 format, as the prefix for statsd messages, and as the default"},{"line_number":603,"context_line":"                 value for ``log_route``; defaults to the ``log_name`` value in"},{"line_number":604,"context_line":"                 ``conf``, if it exists, or to \u0027swift\u0027."},{"line_number":605,"context_line":"    :param log_to_console: Add handler which writes to console on stderr"}],"source_content_type":"text/x-python","patch_set":14,"id":"11343657_806f41d4","line":602,"range":{"start_line":602,"start_character":25,"end_line":602,"end_character":58},"in_reply_to":"878ee815_6bb80e46","updated":"2024-06-05 20:14:42.000000000","message":"Acknowledged","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78a119bda2e432ff1d140c33f5f6375ec16f2172","unresolved":true,"context_lines":[{"line_number":525,"context_line":"        return self.logger.timing_since(*a, **kw)"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"    def transfer_rate(self, *a, **kw):"},{"line_number":528,"context_line":"        return self.logger.transfer_rate(*a, **kw)"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"    @property"},{"line_number":531,"context_line":"    def thread_locals(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"8c6788f3_9e29f95f","line":528,"updated":"2024-08-28 19:54:32.000000000","message":"generally I think the desired goal of this patch was to get these statsd methods out of the logs module\n\nwe may need something like:\n\n```\ndef get_prefixed_logger(facade_object, prefix\u003d\u0027\u0027):\n    prefixed_logger \u003d PrefixLoggerAdapter(facade_object.logger)\n    return LoggerStatsdFacade(prefixed_logger, facade_object.statsd_client)\n\n```\n\nover in utils that we can call in the daemons that use a PrefixedLogAdapter (like the relinker)","commit_id":"8cc58dd803339ed73e962c090a65c96af1dad71a"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4b5fd3e2bdd312c32f73bd498394113d1cd5f475","unresolved":false,"context_lines":[{"line_number":525,"context_line":"        return self.logger.timing_since(*a, **kw)"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"    def transfer_rate(self, *a, **kw):"},{"line_number":528,"context_line":"        return self.logger.transfer_rate(*a, **kw)"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"    @property"},{"line_number":531,"context_line":"    def thread_locals(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"56fb35a1_01efbd85","line":528,"in_reply_to":"8c6788f3_9e29f95f","updated":"2024-08-29 18:33:29.000000000","message":"Acknowledged","commit_id":"8cc58dd803339ed73e962c090a65c96af1dad71a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5e1fdd57fe84c09e4d02c11387ceffa4e56f3c6e","unresolved":true,"context_lines":[{"line_number":586,"context_line":"        return self.logger.timing_since(*a, **kw)"},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"    def transfer_rate(self, *a, **kw):"},{"line_number":589,"context_line":"        return self.logger.transfer_rate(*a, **kw)"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    @property"},{"line_number":592,"context_line":"    def thread_locals(self):"}],"source_content_type":"text/x-python","patch_set":38,"id":"c3536073_930ee9e6","side":"PARENT","line":589,"updated":"2024-09-18 14:06:38.000000000","message":"we have lost some backwards compatibility here for any third party that was using SwiftLoggerAdapter or PrefixLoggerAdapter","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":586,"context_line":"        return self.logger.timing_since(*a, **kw)"},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"    def transfer_rate(self, *a, **kw):"},{"line_number":589,"context_line":"        return self.logger.transfer_rate(*a, **kw)"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    @property"},{"line_number":592,"context_line":"    def thread_locals(self):"}],"source_content_type":"text/x-python","patch_set":38,"id":"fc96cdf6_a4288735","side":"PARENT","line":589,"in_reply_to":"4080929d_3c666391","updated":"2024-09-23 19:08:03.000000000","message":"Done","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"de668528ac966f38cff52c1b391253852a938e7e","unresolved":true,"context_lines":[{"line_number":586,"context_line":"        return self.logger.timing_since(*a, **kw)"},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"    def transfer_rate(self, *a, **kw):"},{"line_number":589,"context_line":"        return self.logger.transfer_rate(*a, **kw)"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    @property"},{"line_number":592,"context_line":"    def thread_locals(self):"}],"source_content_type":"text/x-python","patch_set":38,"id":"4080929d_3c666391","side":"PARENT","line":589,"in_reply_to":"c3536073_930ee9e6","updated":"2024-09-18 17:01:13.000000000","message":"I\u0027m not too concerned about losing this compatibility and in a verbal discussion other cores also expressed opinion that this shouldn\u0027t have been considered a public interface. Also, it\u0027s pretty simple for third party to reproduce this if it is needed.","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"7023b298233a5b8d0d113c4bffc0af355a5d82dd","unresolved":true,"context_lines":[{"line_number":537,"context_line":"        self.logger.exception(msg, *a, **kw)"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"class PrefixLoggerAdapter(SwiftLoggerAdapter):"},{"line_number":541,"context_line":"    \"\"\""},{"line_number":542,"context_line":"    Adds an optional prefix to all its log messages. When the prefix has not"},{"line_number":543,"context_line":"    been set, messages are unchanged."}],"source_content_type":"text/x-python","patch_set":38,"id":"48211b05_7f9ee76b","line":540,"updated":"2024-09-19 12:29:15.000000000","message":"IIUC this does nothing unless set_prefix has been called - so why don\u0027t we merge the functionality into LogAdapter so that it is always available? Then we don\u0027t need to figure out how to adapt a LogStatsdFacade.","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        self.logger.exception(msg, *a, **kw)"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"class PrefixLoggerAdapter(SwiftLoggerAdapter):"},{"line_number":541,"context_line":"    \"\"\""},{"line_number":542,"context_line":"    Adds an optional prefix to all its log messages. When the prefix has not"},{"line_number":543,"context_line":"    been set, messages are unchanged."}],"source_content_type":"text/x-python","patch_set":38,"id":"7595dba4_bc627fa9","line":540,"in_reply_to":"48211b05_7f9ee76b","updated":"2024-09-23 19:08:03.000000000","message":"Done","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"25e6bf85ce3fb88b8abdfb2b6ac1d40662af5a44","unresolved":true,"context_lines":[{"line_number":602,"context_line":"        self.logger.exception(msg, *a, **kw)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"class PrefixLoggerAdapter(SwiftLoggerAdapter):"},{"line_number":606,"context_line":"    \"\"\""},{"line_number":607,"context_line":"    Adds an optional prefix to all its log messages. When the prefix has not"},{"line_number":608,"context_line":"    been set, messages are unchanged."}],"source_content_type":"text/x-python","patch_set":40,"id":"7ce7c7a4_502c8f99","side":"PARENT","line":605,"updated":"2024-09-23 15:24:24.000000000","message":"ok, but now SwiftLogAdapter must *really* be not used!?","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":602,"context_line":"        self.logger.exception(msg, *a, **kw)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"class PrefixLoggerAdapter(SwiftLoggerAdapter):"},{"line_number":606,"context_line":"    \"\"\""},{"line_number":607,"context_line":"    Adds an optional prefix to all its log messages. When the prefix has not"},{"line_number":608,"context_line":"    been set, messages are unchanged."}],"source_content_type":"text/x-python","patch_set":40,"id":"e890d157_e1d47c1e","side":"PARENT","line":605,"in_reply_to":"7ce7c7a4_502c8f99","updated":"2024-09-23 19:08:03.000000000","message":"Yep, Swift\"Logger\"Adapter isn\u0027t really used directly in any daemon","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"25e6bf85ce3fb88b8abdfb2b6ac1d40662af5a44","unresolved":true,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"# double inheritance to support property with setter"},{"line_number":244,"context_line":"class SwiftLogAdapter(logging.LoggerAdapter, object):"},{"line_number":245,"context_line":"    \"\"\""},{"line_number":246,"context_line":"    A Logger like object which performs some reformatting on calls to"},{"line_number":247,"context_line":"    :meth:`exception`.  Can be used to store a threadlocal transaction id and"}],"source_content_type":"text/x-python","patch_set":40,"id":"25ed23c0_18005d28","line":244,"updated":"2024-09-23 15:24:24.000000000","message":"I like this name change, it makes it *obviously* not stdlib.  But it seems bad/confusing to have a thing SwiftLogAdapter and an un-used SwiftLoggerAdapter in the same module.","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"b881ca7663b178b876d692531da587607a5e958c","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"# double inheritance to support property with setter"},{"line_number":244,"context_line":"class SwiftLogAdapter(logging.LoggerAdapter, object):"},{"line_number":245,"context_line":"    \"\"\""},{"line_number":246,"context_line":"    A Logger like object which performs some reformatting on calls to"},{"line_number":247,"context_line":"    :meth:`exception`.  Can be used to store a threadlocal transaction id and"}],"source_content_type":"text/x-python","patch_set":40,"id":"70eeab22_77e6df07","line":244,"in_reply_to":"25ed23c0_18005d28","updated":"2024-09-23 20:47:37.000000000","message":"Acknowledged","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3a906a2ee4f3a05cfaf79739a7045570711a5bb3","unresolved":true,"context_lines":[{"line_number":317,"context_line":"        return self.logger.getEffectiveLevel()"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def set_prefix(self, prefix):"},{"line_number":320,"context_line":"        self.extra[\u0027prefix\u0027] \u003d prefix"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def process(self, msg, kwargs):"},{"line_number":323,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":40,"id":"c86bc195_9433803d","line":320,"updated":"2024-09-23 16:42:28.000000000","message":"I don\u0027t think it makes sense to store prefix in ``self.extra``. It can just be a class member, set to None in the constructor, then here:\n\n```\ndef set_prefix(prefix):\n    self.prefix \u003d prefix\n```\n\nFWIW, A stdlib LoggerAdapter has an extra attribute. Its process method forwards the process call to the wrapped Logger, adding the content of extra. But this class overrides that LoggerAdapter.process call, so self.extra isn\u0027t used. It\u0027s all very confused! But I think this is making it better :) And it\u0027ll be best to avoid more confusion by using self.extra to store prefix.","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"b881ca7663b178b876d692531da587607a5e958c","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        return self.logger.getEffectiveLevel()"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def set_prefix(self, prefix):"},{"line_number":320,"context_line":"        self.extra[\u0027prefix\u0027] \u003d prefix"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def process(self, msg, kwargs):"},{"line_number":323,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":40,"id":"7b3585e9_1215aee4","line":320,"in_reply_to":"c86bc195_9433803d","updated":"2024-09-23 20:47:37.000000000","message":"Acknowledged","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"}],"swift/container/sharder.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":853,"context_line":"    def __init__(self, conf, logger\u003dNone):"},{"line_number":854,"context_line":"        statsd_logger \u003d logger or get_statsd_client("},{"line_number":855,"context_line":"            conf, logger\u003dlogger, tail_prefix\u003d\u0027proxy-server\u0027)"},{"line_number":856,"context_line":"        logger \u003d statsd_logger or get_logger(conf, log_route\u003dself.log_route)"},{"line_number":857,"context_line":"        ContainerReplicator.__init__(self, conf, logger\u003dlogger)"},{"line_number":858,"context_line":"        ContainerSharderConf.__init__(self, conf)"},{"line_number":859,"context_line":"        ContainerSharderConf.validate_conf(self)"}],"source_content_type":"text/x-python","patch_set":6,"id":"d2d46d72_b2f8d103","line":856,"updated":"2024-05-02 19:13:15.000000000","message":"does this... even... work?  it looks like `self.logger` would be an instance of a `StatsdClient` - does a `StatsdClient` have methods like `StatsdClient.debug` !?\n\noh good, it\u0027s totally broken - I thought i was loosing my mind:\n\n    vagrant@saio:~$ swift-init container-sharder once -nv\n    WARNING: Unable to modify max process limit.  Running as non-root?\n    Running container-sharder once...(/etc/swift/container-server/1.conf.d)\n    Running container-sharder once...(/etc/swift/container-server/2.conf.d)\n    Running container-sharder once...(/etc/swift/container-server/3.conf.d)\n    Running container-sharder once...(/etc/swift/container-server/4.conf.d)\n    container-sharder-6011: Starting 50504\n    container-sharder-6031: Starting 50506\n    container-sharder-6021: Starting 50505\n    container-sharder-6041: Starting 50507\n    container-sharder-6031: UNCAUGHT EXCEPTION#012Traceback (most recent call last):#012  File \"/usr/local/bin/swift-container-sharder\", line 7, in \u003cmodule\u003e#012    exec(compile(f.read(), __file__, \u0027exec\u0027))#012  File \"/vagrant/swift/bin/swift-container-sharder\", line 37, in \u003cmodule\u003e#012    run_daemon(ContainerSharder, conf_file, **options)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 331, in run_daemon#012    DaemonStrategy(d, logger).run(once\u003donce, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 158, in run#012    self._run(once\u003donce, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 230, in _run#012    return self._run_inline(once, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 152, in _run_inline#012    self.daemon.run(once\u003donce, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 64, in run#012    self.run_once(**kwargs)#012  File \"/vagrant/swift/swift/container/sharder.py\", line 2569, in run_once#012    self.logger.info(\u0027Begin container sharder \"once\" mode\u0027)#012AttributeError: \u0027StatsdClient\u0027 object has no attribute \u0027info\u0027\n    container-sharder-6041: UNCAUGHT EXCEPTION#012Traceback (most recent call last):#012  File \"/usr/local/bin/swift-container-sharder\", line 7, in \u003cmodule\u003e#012    exec(compile(f.read(), __file__, \u0027exec\u0027))#012  File \"/vagrant/swift/bin/swift-container-sharder\", line 37, in \u003cmodule\u003e#012    run_daemon(ContainerSharder, conf_file, **options)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 331, in run_daemon#012    DaemonStrategy(d, logger).run(once\u003donce, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 158, in run#012    self._run(once\u003donce, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 230, in _run#012    return self._run_inline(once, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 152, in _run_inline#012    self.daemon.run(once\u003donce, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 64, in run#012    self.run_once(**kwargs)#012  File \"/vagrant/swift/swift/container/sharder.py\", line 2569, in run_once#012    self.logger.info(\u0027Begin container sharder \"once\" mode\u0027)#012AttributeError: \u0027StatsdClient\u0027 object has no attribute \u0027info\u0027\n    container-sharder-6011: UNCAUGHT EXCEPTION#012Traceback (most recent call last):#012  File \"/usr/local/bin/swift-container-sharder\", line 7, in \u003cmodule\u003e#012    exec(compile(f.read(), __file__, \u0027exec\u0027))#012  File \"/vagrant/swift/bin/swift-container-sharder\", line 37, in \u003cmodule\u003e#012    run_daemon(ContainerSharder, conf_file, **options)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 331, in run_daemon#012    DaemonStrategy(d, logger).run(once\u003donce, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 158, in run#012    self._run(once\u003donce, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 230, in _run#012    return self._run_inline(once, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 152, in _run_inline#012    self.daemon.run(once\u003donce, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 64, in run#012    self.run_once(**kwargs)#012  File \"/vagrant/swift/swift/container/sharder.py\", line 2569, in run_once#012    self.logger.info(\u0027Begin container sharder \"once\" mode\u0027)#012AttributeError: \u0027StatsdClient\u0027 object has no attribute \u0027info\u0027\n    container-sharder-6021: UNCAUGHT EXCEPTION#012Traceback (most recent call last):#012  File \"/usr/local/bin/swift-container-sharder\", line 7, in \u003cmodule\u003e#012    exec(compile(f.read(), __file__, \u0027exec\u0027))#012  File \"/vagrant/swift/bin/swift-container-sharder\", line 37, in \u003cmodule\u003e#012    run_daemon(ContainerSharder, conf_file, **options)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 331, in run_daemon#012    DaemonStrategy(d, logger).run(once\u003donce, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 158, in run#012    self._run(once\u003donce, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 230, in _run#012    return self._run_inline(once, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 152, in _run_inline#012    self.daemon.run(once\u003donce, **kwargs)#012  File \"/vagrant/swift/swift/common/daemon.py\", line 64, in run#012    self.run_once(**kwargs)#012  File \"/vagrant/swift/swift/container/sharder.py\", line 2569, in run_once#012    self.logger.info(\u0027Begin container sharder \"once\" mode\u0027)#012AttributeError: \u0027StatsdClient\u0027 object has no attribute \u0027info\u0027","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"526ae3f20f26f813a4111112b52ffca67cfb5588","unresolved":false,"context_lines":[{"line_number":853,"context_line":"    def __init__(self, conf, logger\u003dNone):"},{"line_number":854,"context_line":"        statsd_logger \u003d logger or get_statsd_client("},{"line_number":855,"context_line":"            conf, logger\u003dlogger, tail_prefix\u003d\u0027proxy-server\u0027)"},{"line_number":856,"context_line":"        logger \u003d statsd_logger or get_logger(conf, log_route\u003dself.log_route)"},{"line_number":857,"context_line":"        ContainerReplicator.__init__(self, conf, logger\u003dlogger)"},{"line_number":858,"context_line":"        ContainerSharderConf.__init__(self, conf)"},{"line_number":859,"context_line":"        ContainerSharderConf.validate_conf(self)"}],"source_content_type":"text/x-python","patch_set":6,"id":"daeeea57_de4b4674","line":856,"in_reply_to":"d2d46d72_b2f8d103","updated":"2024-05-08 22:10:38.000000000","message":"Acknowledged","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"7efedbd417183dccd3e35f831ccc2cbdba74d338","unresolved":true,"context_lines":[{"line_number":853,"context_line":"    def __init__(self, conf, logger\u003dNone):"},{"line_number":854,"context_line":"        statsd_logger \u003d logger or get_statsd_client("},{"line_number":855,"context_line":"            conf, logger\u003dlogger, tail_prefix\u003d\u0027proxy-server\u0027)"},{"line_number":856,"context_line":"        logger \u003d statsd_logger or get_logger(conf, log_route\u003dself.log_route)"},{"line_number":857,"context_line":"        ContainerReplicator.__init__(self, conf, logger\u003dlogger)"},{"line_number":858,"context_line":"        ContainerSharderConf.__init__(self, conf)"},{"line_number":859,"context_line":"        ContainerSharderConf.validate_conf(self)"}],"source_content_type":"text/x-python","patch_set":10,"id":"e9ce76e2_aae0f819","line":856,"updated":"2024-05-15 16:02:01.000000000","message":"I don\u0027t understand what the intention is here, but surely this cannot be right?\n\nIf we have log_statsd_host in the conf then we use a StatsdClient as the logger? Why? \n\nI\u0027m sad that our tests don\u0027t catch this, I had to hack one:\n\n```\ndiff --git a/test/unit/container/test_sharder.py b/test/unit/container/test_sharder.py\nindex 46ca3c916..80d81480b 100644\n--- a/test/unit/container/test_sharder.py\n+++ b/test/unit/container/test_sharder.py\n@@ -794,7 +794,8 @@ class TestSharder(BaseTestSharder):\n     def test_one_shard_cycle(self):\n         conf \u003d {\u0027recon_cache_path\u0027: self.tempdir,\n                 \u0027devices\u0027: self.tempdir,\n-                \u0027shard_container_threshold\u0027: 9}\n+                \u0027shard_container_threshold\u0027: 9,\n+                \u0027log_statsd_host\u0027: \u0027foo\u0027}\n\n         def fake_ismount(path):\n             # unmounted_dev is defined from .get_more_nodes() below\n@@ -1157,7 +1158,7 @@ class TestSharder(BaseTestSharder):\n             with mock.patch(\n                     \u0027swift.common.db_replicator.ring.Ring\u0027,\n                     return_value\u003dfake_ring):\n-                sharder \u003d ContainerSharder(conf, logger\u003dself.logger)\n+                sharder \u003d ContainerSharder(conf)\n                 sharder._local_device_ids \u003d {dev[\u0027id\u0027]: dev\n                                              for dev in fake_ring.devs}\n                 sharder._replicate_object \u003d mock.MagicMock(\n\n\n\n\u003e       self.logger.info(\u0027Container sharder cycle starting, auto-sharding %s\u0027,\n                         self.auto_shard)\nE       AttributeError: \u0027StatsdClient\u0027 object has no attribute \u0027info\u0027```","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ed9c95505b7a3d793654ecc8617060c8d244b6a3","unresolved":false,"context_lines":[{"line_number":853,"context_line":"    def __init__(self, conf, logger\u003dNone):"},{"line_number":854,"context_line":"        statsd_logger \u003d logger or get_statsd_client("},{"line_number":855,"context_line":"            conf, logger\u003dlogger, tail_prefix\u003d\u0027proxy-server\u0027)"},{"line_number":856,"context_line":"        logger \u003d statsd_logger or get_logger(conf, log_route\u003dself.log_route)"},{"line_number":857,"context_line":"        ContainerReplicator.__init__(self, conf, logger\u003dlogger)"},{"line_number":858,"context_line":"        ContainerSharderConf.__init__(self, conf)"},{"line_number":859,"context_line":"        ContainerSharderConf.validate_conf(self)"}],"source_content_type":"text/x-python","patch_set":10,"id":"519aa301_a61dfd49","line":856,"in_reply_to":"b0f56e68_7377335a","updated":"2024-05-29 19:21:39.000000000","message":"Acknowledged","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb5a2b7ee08b9b19c5f8445f15074c4c030b6d99","unresolved":true,"context_lines":[{"line_number":853,"context_line":"    def __init__(self, conf, logger\u003dNone):"},{"line_number":854,"context_line":"        statsd_logger \u003d logger or get_statsd_client("},{"line_number":855,"context_line":"            conf, logger\u003dlogger, tail_prefix\u003d\u0027proxy-server\u0027)"},{"line_number":856,"context_line":"        logger \u003d statsd_logger or get_logger(conf, log_route\u003dself.log_route)"},{"line_number":857,"context_line":"        ContainerReplicator.__init__(self, conf, logger\u003dlogger)"},{"line_number":858,"context_line":"        ContainerSharderConf.__init__(self, conf)"},{"line_number":859,"context_line":"        ContainerSharderConf.validate_conf(self)"}],"source_content_type":"text/x-python","patch_set":10,"id":"b0f56e68_7377335a","line":856,"in_reply_to":"e9ce76e2_aae0f819","updated":"2024-05-15 18:00:52.000000000","message":"please put off any changes to the daemons until AFTER we have `utils.get_logger` working the way we want.  If you HAVE to make any changes to in-tree calls to `utils.get_logger` that makes it smell like our \"shim\" isn\u0027t a perfect translation.","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"}],"swift/obj/auditor.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"52401de55d5d61d38afa7c03381f38d2c210ffa7","unresolved":true,"context_lines":[{"line_number":494,"context_line":"    def __init__(self, watcher_class, watcher_name, conf, logger):"},{"line_number":495,"context_line":"        self.watcher_name \u003d watcher_name"},{"line_number":496,"context_line":"        self.watcher_in_error \u003d False"},{"line_number":497,"context_line":"        self.logger \u003d get_prefixed_logger(logger, {})"},{"line_number":498,"context_line":"        self.logger.set_prefix(\u0027[audit-watcher %s] \u0027 % watcher_name)"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":30,"id":"8d61ec56_75d2afe5","line":497,"updated":"2024-08-29 22:00:26.000000000","message":"I\u0027m fairly torn here.\n\nOn the one hand, to the extent that we\u0027ve thought about stats coming out of audit watchers, we\u0027ve only really considered using recon dumps. Nowhere in [the relatively short history of in-tree watcher development](https://review.opendev.org/q/file:%5Eswift/obj/watchers/.*) have we tried to use the logger for anything other than logging.\n\nOn the other hand, that\u0027s not to say that *no one* could have written some watcher that *did* want a statsd client... and I **do** hate the idea of breaking backwards compat... and if we later *did* want to pass a separate statsd client, we\u0027d have to assume that we\u0027d break a bunch of existing watchers because of the signature change to `__init__`...\n\nOn the other other hand, I don\u0027t particularly like enshrining the awkward logger-that-also-does-stats pattern that we\u0027re *trying to move away from* as the API for watchers...","commit_id":"59ac0d72ad675530c2d5d073bf0afde04e4ddf5e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"94ba6197988861b3d78e634b05a38cb43d7ad7ba","unresolved":true,"context_lines":[{"line_number":494,"context_line":"    def __init__(self, watcher_class, watcher_name, conf, logger):"},{"line_number":495,"context_line":"        self.watcher_name \u003d watcher_name"},{"line_number":496,"context_line":"        self.watcher_in_error \u003d False"},{"line_number":497,"context_line":"        self.logger \u003d SwiftLogAdapter(logger, {})"},{"line_number":498,"context_line":"        self.logger.set_prefix(\u0027[audit-watcher %s] \u0027 % watcher_name)"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":42,"id":"96166a6d_126b94dc","line":497,"updated":"2024-09-24 17:12:25.000000000","message":"same as relinker, do we need to wrap the logger again if logger is already a SwiftLogAdapter?","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"48236fbac3b8bcf6c79874284013d17f50792120","unresolved":false,"context_lines":[{"line_number":494,"context_line":"    def __init__(self, watcher_class, watcher_name, conf, logger):"},{"line_number":495,"context_line":"        self.watcher_name \u003d watcher_name"},{"line_number":496,"context_line":"        self.watcher_in_error \u003d False"},{"line_number":497,"context_line":"        self.logger \u003d SwiftLogAdapter(logger, {})"},{"line_number":498,"context_line":"        self.logger.set_prefix(\u0027[audit-watcher %s] \u0027 % watcher_name)"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":42,"id":"a2f3734e_dda46719","line":497,"in_reply_to":"96166a6d_126b94dc","updated":"2024-09-26 13:26:42.000000000","message":"Acknowledged","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"fca9ec8d6734d516d63f0627028d18f48e85e972","unresolved":true,"context_lines":[{"line_number":493,"context_line":"    def __init__(self, watcher_class, watcher_name, conf, logger):"},{"line_number":494,"context_line":"        self.watcher_name \u003d watcher_name"},{"line_number":495,"context_line":"        self.watcher_in_error \u003d False"},{"line_number":496,"context_line":"        self.logger \u003d logger"},{"line_number":497,"context_line":"        self.logger.set_prefix(\u0027[audit-watcher %s] \u0027 % watcher_name)"},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":45,"id":"728244ce_10d2dcc2","line":496,"updated":"2024-09-30 18:08:05.000000000","message":"I think we should strongly consider pulling the PrefixLoggerAdatper removal changes out ahead of this patch","commit_id":"528b24489517a01fb924cd989c7a6617f7a7a858"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"546f00f4fcbd074911bdd326586fba944f068b80","unresolved":false,"context_lines":[{"line_number":493,"context_line":"    def __init__(self, watcher_class, watcher_name, conf, logger):"},{"line_number":494,"context_line":"        self.watcher_name \u003d watcher_name"},{"line_number":495,"context_line":"        self.watcher_in_error \u003d False"},{"line_number":496,"context_line":"        self.logger \u003d logger"},{"line_number":497,"context_line":"        self.logger.set_prefix(\u0027[audit-watcher %s] \u0027 % watcher_name)"},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":45,"id":"fc7745d7_58f2ce5b","line":496,"in_reply_to":"728244ce_10d2dcc2","updated":"2024-10-03 13:14:21.000000000","message":"Done\n931060: Remove PrefixLoggerAdapter and SwiftLoggerAdapter Rename LogAdapter to SwiftLogAdapter | https://review.opendev.org/c/openstack/swift/+/931060","commit_id":"528b24489517a01fb924cd989c7a6617f7a7a858"}],"swift/obj/reconstructor.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"class HybridMultiObjectDispatcher(object):"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def __init__(self, *object):"},{"line_number":152,"context_line":"        self.object \u003d object"},{"line_number":153,"context_line":"        self.set_attribute()"},{"line_number":154,"context_line":"    # pass logger, statsdclient, get_logger?"}],"source_content_type":"text/x-python","patch_set":6,"id":"8976e4b9_dcbf1a11","line":151,"updated":"2024-05-02 19:13:15.000000000","message":"avoid using the name of a built-in as a variable/arg [1]; I\u0027d recommend `*objs`\n\n1. https://peps.python.org/pep-0008/#function-and-method-arguments","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"6b1b46e6cdf0885d74878e75664114e80de3ec5d","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"class HybridMultiObjectDispatcher(object):"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def __init__(self, *object):"},{"line_number":152,"context_line":"        self.object \u003d object"},{"line_number":153,"context_line":"        self.set_attribute()"},{"line_number":154,"context_line":"    # pass logger, statsdclient, get_logger?"}],"source_content_type":"text/x-python","patch_set":6,"id":"0cbfb5ea_325c859d","line":151,"in_reply_to":"8976e4b9_dcbf1a11","updated":"2024-05-07 20:18:42.000000000","message":"Acknowledged","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":154,"context_line":"    # pass logger, statsdclient, get_logger?"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def debug(self):"},{"line_number":157,"context_line":"        self.logger.debug()"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def __get_attribute__(self, name):"},{"line_number":160,"context_line":"        for obj in self.object:"}],"source_content_type":"text/x-python","patch_set":6,"id":"c756ba05_2b1ff12e","line":157,"updated":"2024-05-02 19:13:15.000000000","message":"this doesn\u0027t look right...","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"526ae3f20f26f813a4111112b52ffca67cfb5588","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    # pass logger, statsdclient, get_logger?"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def debug(self):"},{"line_number":157,"context_line":"        self.logger.debug()"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def __get_attribute__(self, name):"},{"line_number":160,"context_line":"        for obj in self.object:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3822d887_93744b51","line":157,"in_reply_to":"c756ba05_2b1ff12e","updated":"2024-05-08 22:10:38.000000000","message":"Acknowledged","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":156,"context_line":"    def debug(self):"},{"line_number":157,"context_line":"        self.logger.debug()"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def __get_attribute__(self, name):"},{"line_number":160,"context_line":"        for obj in self.object:"},{"line_number":161,"context_line":"            if hasattr(obj, name):"},{"line_number":162,"context_line":"                return getattr(obj, name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"268fd77b_848c29dc","line":159,"updated":"2024-05-02 19:13:15.000000000","message":"I dont\u0027 think this is actually a magic method:\n\nhttps://stackoverflow.com/questions/4295678/understanding-the-difference-between-getattr-and-getattribute\nhttps://docs.python.org/3/reference/datamodel.html#customizing-attribute-access","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"301e649831002fcdb2f2e2ce7c543853598aaa58","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    def debug(self):"},{"line_number":157,"context_line":"        self.logger.debug()"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def __get_attribute__(self, name):"},{"line_number":160,"context_line":"        for obj in self.object:"},{"line_number":161,"context_line":"            if hasattr(obj, name):"},{"line_number":162,"context_line":"                return getattr(obj, name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"d0fa20bd_2c882e90","line":159,"in_reply_to":"268fd77b_848c29dc","updated":"2024-05-13 22:30:38.000000000","message":"Acknowledged","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":168,"context_line":"        self.decrement \u003d self.__get_attribute__(\u0027decrement\u0027)"},{"line_number":169,"context_line":"        self.update_stats \u003d self.__get_attribute__(\u0027update_stats\u0027)"},{"line_number":170,"context_line":"        self.timing \u003d self.__get_attribute__(\u0027timing\u0027)"},{"line_number":171,"context_line":"        self.timing_since \u003d self.__get_attribute__(\u0027timing_since\u0027)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"class ObjectReconstructor(Daemon):"}],"source_content_type":"text/x-python","patch_set":6,"id":"364d18ee_3a0593c1","line":171,"updated":"2024-05-02 19:13:15.000000000","message":"this doesn\u0027t look right...","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"301e649831002fcdb2f2e2ce7c543853598aaa58","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        self.decrement \u003d self.__get_attribute__(\u0027decrement\u0027)"},{"line_number":169,"context_line":"        self.update_stats \u003d self.__get_attribute__(\u0027update_stats\u0027)"},{"line_number":170,"context_line":"        self.timing \u003d self.__get_attribute__(\u0027timing\u0027)"},{"line_number":171,"context_line":"        self.timing_since \u003d self.__get_attribute__(\u0027timing_since\u0027)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"class ObjectReconstructor(Daemon):"}],"source_content_type":"text/x-python","patch_set":6,"id":"d26f35bd_f676d1c8","line":171,"in_reply_to":"364d18ee_3a0593c1","updated":"2024-05-13 22:30:38.000000000","message":"Acknowledged","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":191,"context_line":"            logger or get_logger(conf, log_route\u003d\u0027object-reconstructor\u0027), {})"},{"line_number":192,"context_line":"        getlogger \u003d get_logger(conf, log_route\u003d\u0027object-reconstructor\u0027), {}"},{"line_number":193,"context_line":"        statsd \u003d StatsdClient(conf)"},{"line_number":194,"context_line":"        self.logger1 \u003d HybridMultiObjectDispatcher(statsd, getlogger, logger)"},{"line_number":195,"context_line":"        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":196,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":197,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"76db540f_2e218118","line":194,"updated":"2024-05-02 19:13:15.000000000","message":"ok, so how about this:\n\nmove HybridMultiObjectDispatcher into common.utils and write a \"get_logger_with_statsd_client_proxy\" *shim* that calls logs.get_logger and statsd_client.get_statsd_client and returns a `HybridMultiObjectDispatcher(logger, statsd_client)`\n\nThen we \"alias\" `utils.get_logger \u003d get_logger_with_statsd_client_proxy`\n\nIn this change, all existing code would continues to call `common.utils.get_logger` \n\n... but maybe *eventually* really smart code starts to get clearer/more-specific with:\n\n```\nself.logger \u003d logs.get_logger(conf)\nself.stats \u003d statsd_client.get_statsd_client(conf)\n```\n\n... and `utils.get_logger` just remains for backwards compat with out-of-tree code.","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"301e649831002fcdb2f2e2ce7c543853598aaa58","unresolved":false,"context_lines":[{"line_number":191,"context_line":"            logger or get_logger(conf, log_route\u003d\u0027object-reconstructor\u0027), {})"},{"line_number":192,"context_line":"        getlogger \u003d get_logger(conf, log_route\u003d\u0027object-reconstructor\u0027), {}"},{"line_number":193,"context_line":"        statsd \u003d StatsdClient(conf)"},{"line_number":194,"context_line":"        self.logger1 \u003d HybridMultiObjectDispatcher(statsd, getlogger, logger)"},{"line_number":195,"context_line":"        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":196,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":197,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"848e18e6_3c4a3f04","line":194,"in_reply_to":"76db540f_2e218118","updated":"2024-05-13 22:30:38.000000000","message":"Acknowledged","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"7efedbd417183dccd3e35f831ccc2cbdba74d338","unresolved":true,"context_lines":[{"line_number":155,"context_line":"    logs \u003d get_logger(conf, log_route\u003d\u0027object-reconstructor\u0027)"},{"line_number":156,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf)"},{"line_number":157,"context_line":"    logger \u003d HybridMultiObjectDispatcher(logs, statsd)"},{"line_number":158,"context_line":"    return logger"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"class ObjectReconstructor(Daemon):"}],"source_content_type":"text/x-python","patch_set":10,"id":"d2a35811_bdb1c6d8","line":158,"updated":"2024-05-15 16:02:01.000000000","message":"why is this the only place that we have this pattern used?","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ed9c95505b7a3d793654ecc8617060c8d244b6a3","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    logs \u003d get_logger(conf, log_route\u003d\u0027object-reconstructor\u0027)"},{"line_number":156,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf)"},{"line_number":157,"context_line":"    logger \u003d HybridMultiObjectDispatcher(logs, statsd)"},{"line_number":158,"context_line":"    return logger"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"class ObjectReconstructor(Daemon):"}],"source_content_type":"text/x-python","patch_set":10,"id":"97049f0a_2b0a0775","line":158,"in_reply_to":"d2a35811_bdb1c6d8","updated":"2024-05-29 19:21:39.000000000","message":"This is the one place I\u0027m trying on. Once all changes are good to go or nearly ready, I will have this wherever needed!","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"387075012855054d0b86ef693856d024aedde11a","unresolved":true,"context_lines":[{"line_number":155,"context_line":"    logs \u003d get_logger(conf, log_route\u003d\u0027object-reconstructor\u0027)"},{"line_number":156,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf)"},{"line_number":157,"context_line":"    logger \u003d LoggerStatsdFascade(logs, statsd)"},{"line_number":158,"context_line":"    return logger"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"class ObjectReconstructor(Daemon):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fbe37fe9_51a60cfa","line":158,"updated":"2024-06-04 00:46:01.000000000","message":"It seems like this is a (slightly worse -- the stats client doesn\u0027t have a logger) `get_logger` -- am I missing something?","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"9267720323df2f9cc43cbe1cc4b161e8c7376520","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    logs \u003d get_logger(conf, log_route\u003d\u0027object-reconstructor\u0027)"},{"line_number":156,"context_line":"    statsd \u003d statsd_client.get_statsd_client(conf)"},{"line_number":157,"context_line":"    logger \u003d LoggerStatsdFascade(logs, statsd)"},{"line_number":158,"context_line":"    return logger"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"class ObjectReconstructor(Daemon):"}],"source_content_type":"text/x-python","patch_set":14,"id":"226c7e1a_618739f6","line":158,"in_reply_to":"fbe37fe9_51a60cfa","updated":"2024-06-05 20:14:42.000000000","message":"Yes, I agree. I meant to remove this when I wrote get_logger in utils","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"387075012855054d0b86ef693856d024aedde11a","unresolved":true,"context_lines":[{"line_number":178,"context_line":"            logger or get_logger(conf, log_route\u003d\u0027object-reconstructor\u0027), {})"},{"line_number":179,"context_line":"        self.stats \u003d get_logger_with_statsd_client_proxy(conf)"},{"line_number":180,"context_line":"        # backwards compatibility of get_logger, although it isn\u0027t used again"},{"line_number":181,"context_line":"        utils.get_logger \u003d get_logger_with_statsd_client_proxy"},{"line_number":182,"context_line":"        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":183,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":184,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"0be73c1e_d224564b","line":181,"updated":"2024-06-04 00:46:01.000000000","message":"Wait, what? Why are we monkey-patching like this?","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"9267720323df2f9cc43cbe1cc4b161e8c7376520","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            logger or get_logger(conf, log_route\u003d\u0027object-reconstructor\u0027), {})"},{"line_number":179,"context_line":"        self.stats \u003d get_logger_with_statsd_client_proxy(conf)"},{"line_number":180,"context_line":"        # backwards compatibility of get_logger, although it isn\u0027t used again"},{"line_number":181,"context_line":"        utils.get_logger \u003d get_logger_with_statsd_client_proxy"},{"line_number":182,"context_line":"        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":183,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":184,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"e6e4e84f_53dc5976","line":181,"in_reply_to":"0be73c1e_d224564b","updated":"2024-06-05 20:14:42.000000000","message":"Getting it back as it was","commit_id":"904912652ae9137b6d7fe1519b62f1164a342003"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5e14195bda557ed6293fcb114ac5b31bfd7b6882","unresolved":true,"context_lines":[{"line_number":146,"context_line":"            yield chunk"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"def get_logger_with_statsd_client_proxy(conf):"},{"line_number":150,"context_line":"    \"\"\""},{"line_number":151,"context_line":"    This class shims to LoggerStatsdFascade to get"},{"line_number":152,"context_line":"    a logger"}],"source_content_type":"text/x-python","patch_set":18,"id":"d9a75602_21aa6692","line":149,"updated":"2024-06-07 20:17:07.000000000","message":"No longer needed, yeah? I think we shouldn\u0027t need to touch the reconstructor at all now.","commit_id":"8c31651474f513236065a699da52f7a5a3da1dde"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4a6f5f4651df64772f0db2993f6dfcab3f425698","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            yield chunk"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"def get_logger_with_statsd_client_proxy(conf):"},{"line_number":150,"context_line":"    \"\"\""},{"line_number":151,"context_line":"    This class shims to LoggerStatsdFascade to get"},{"line_number":152,"context_line":"    a logger"}],"source_content_type":"text/x-python","patch_set":18,"id":"e1526684_6496c775","line":149,"in_reply_to":"d9a75602_21aa6692","updated":"2024-06-07 22:37:55.000000000","message":"Acknowledged","commit_id":"8c31651474f513236065a699da52f7a5a3da1dde"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"52401de55d5d61d38afa7c03381f38d2c210ffa7","unresolved":true,"context_lines":[{"line_number":162,"context_line":"        \"\"\""},{"line_number":163,"context_line":"        self.conf \u003d conf"},{"line_number":164,"context_line":"        self.logger \u003d get_prefixed_logger("},{"line_number":165,"context_line":"            logger or get_logger(conf, log_route\u003d\u0027object-reconstructor\u0027), {})"},{"line_number":166,"context_line":"        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":167,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":168,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"}],"source_content_type":"text/x-python","patch_set":30,"id":"3f675ae2_60e250c4","line":165,"updated":"2024-08-29 22:00:26.000000000","message":"Now *this* (and the replicator) might be an interesting case study in using the separated `get_adapted_logger`/`get_statsd_client` methods...","commit_id":"59ac0d72ad675530c2d5d073bf0afde04e4ddf5e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"7367494d181516febfcd5e2fc9b9076a6f2305ca","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        \"\"\""},{"line_number":163,"context_line":"        self.conf \u003d conf"},{"line_number":164,"context_line":"        self.logger \u003d get_prefixed_logger("},{"line_number":165,"context_line":"            logger or get_logger(conf, log_route\u003d\u0027object-reconstructor\u0027), {})"},{"line_number":166,"context_line":"        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":167,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":168,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"}],"source_content_type":"text/x-python","patch_set":30,"id":"ec13e076_88967b5f","line":165,"in_reply_to":"3f675ae2_60e250c4","updated":"2024-08-30 14:18:58.000000000","message":"Oh yes, that is perfect. Works great with get_adapted_logger/get_statsd_client both.\nget_statsd_client didn\u0027t have log_route but I\u0027m adding log_route\u003dNone parameter and all tests pass without a hiccup.","commit_id":"59ac0d72ad675530c2d5d073bf0afde04e4ddf5e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"371d43e55eb849a0d0a3934f03357d737953902a","unresolved":true,"context_lines":[{"line_number":163,"context_line":"        self.conf \u003d conf"},{"line_number":164,"context_line":"        self.logger \u003d get_prefixed_logger("},{"line_number":165,"context_line":"            logger or get_logger(conf, log_route\u003d\u0027object-reconstructor\u0027), {})"},{"line_number":166,"context_line":"        self.logger \u003d self.logger.logger"},{"line_number":167,"context_line":"        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":168,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":169,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"}],"source_content_type":"text/x-python","patch_set":38,"id":"150813c2_da79bba1","line":166,"range":{"start_line":166,"start_character":8,"end_line":166,"end_character":40},"updated":"2024-09-18 12:36:40.000000000","message":"this doesn\u0027t look right, but may be caused by a bug in ``get_prefixed_logger`` ?","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d79d542ad98863b6fc2ae11559e41dc2e4901eda","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        self.conf \u003d conf"},{"line_number":164,"context_line":"        self.logger \u003d get_prefixed_logger("},{"line_number":165,"context_line":"            logger or get_logger(conf, log_route\u003d\u0027object-reconstructor\u0027), {})"},{"line_number":166,"context_line":"        self.logger \u003d self.logger.logger"},{"line_number":167,"context_line":"        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":168,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":169,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"}],"source_content_type":"text/x-python","patch_set":38,"id":"062f9c54_ffd10e4c","line":166,"range":{"start_line":166,"start_character":8,"end_line":166,"end_character":40},"in_reply_to":"150813c2_da79bba1","updated":"2024-09-18 20:57:03.000000000","message":"Removed and this helped resolve those two prefix_logger failing tests,","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"25e6bf85ce3fb88b8abdfb2b6ac1d40662af5a44","unresolved":true,"context_lines":[{"line_number":164,"context_line":"        self.conf \u003d conf"},{"line_number":165,"context_line":"        self.logger \u003d \\"},{"line_number":166,"context_line":"            logger or get_swift_logger(conf, log_route\u003d\u0027object-reconstructor\u0027)"},{"line_number":167,"context_line":"        self.statsd \u003d get_statsd_client(conf)"},{"line_number":168,"context_line":"        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":169,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":170,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"}],"source_content_type":"text/x-python","patch_set":40,"id":"6860165c_579b3420","line":167,"updated":"2024-09-23 15:24:24.000000000","message":"I don\u0027t think this really helps, or is what we wanted.\n\nI think we decided that self.logger to have the new `set_prefix` method; not that we needed to replace a bunch of `self.logger.increment` with something else.","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        self.conf \u003d conf"},{"line_number":165,"context_line":"        self.logger \u003d \\"},{"line_number":166,"context_line":"            logger or get_swift_logger(conf, log_route\u003d\u0027object-reconstructor\u0027)"},{"line_number":167,"context_line":"        self.statsd \u003d get_statsd_client(conf)"},{"line_number":168,"context_line":"        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":169,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":170,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"}],"source_content_type":"text/x-python","patch_set":40,"id":"0e49692d_8c0f01e8","line":167,"in_reply_to":"6860165c_579b3420","updated":"2024-09-23 19:08:03.000000000","message":"Acknowledged","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"25e6bf85ce3fb88b8abdfb2b6ac1d40662af5a44","unresolved":true,"context_lines":[{"line_number":794,"context_line":"                (time.time() - self.start))"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def _emplace_log_prefix(self, worker_index):"},{"line_number":797,"context_line":"        self.logger.set_prefix(\"[worker %d/%d pid\u003d%s] \" % ("},{"line_number":798,"context_line":"            worker_index + 1,  # use 1-based indexing for more readable logs"},{"line_number":799,"context_line":"            self.reconstructor_workers,"},{"line_number":800,"context_line":"            os.getpid()))"}],"source_content_type":"text/x-python","patch_set":40,"id":"848d2feb_76472ac5","line":797,"updated":"2024-09-23 15:24:24.000000000","message":"so get_swift_logger now returns an object that supports the `set_prefix` method/interface","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":794,"context_line":"                (time.time() - self.start))"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def _emplace_log_prefix(self, worker_index):"},{"line_number":797,"context_line":"        self.logger.set_prefix(\"[worker %d/%d pid\u003d%s] \" % ("},{"line_number":798,"context_line":"            worker_index + 1,  # use 1-based indexing for more readable logs"},{"line_number":799,"context_line":"            self.reconstructor_workers,"},{"line_number":800,"context_line":"            os.getpid()))"}],"source_content_type":"text/x-python","patch_set":40,"id":"424d30de_c11cd4ed","line":797,"in_reply_to":"848d2feb_76472ac5","updated":"2024-09-23 19:08:03.000000000","message":"Acknowledged","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"25e6bf85ce3fb88b8abdfb2b6ac1d40662af5a44","unresolved":true,"context_lines":[{"line_number":1117,"context_line":"                             job[\u0027partition\u0027], job[\u0027device\u0027], job[\u0027policy\u0027])"},{"line_number":1118,"context_line":"            self.statsd.increment(\u0027partition.lock-failure.count\u0027)"},{"line_number":1119,"context_line":"            self.handoffs_remaining +\u003d 1"},{"line_number":1120,"context_line":"        self.statsd.timing_since(\u0027partition.delete.timing\u0027, begin)"},{"line_number":1121,"context_line":""},{"line_number":1122,"context_line":"    def _get_part_jobs(self, local_dev, part_path, partition, policy):"},{"line_number":1123,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":40,"id":"90881a17_a5972bc3","line":1120,"updated":"2024-09-23 15:24:24.000000000","message":"all of these changes are unrelated to the goal of the patch and sort of smell - unless the interface has changed we shouldn\u0027t see this kind of churn.","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":1117,"context_line":"                             job[\u0027partition\u0027], job[\u0027device\u0027], job[\u0027policy\u0027])"},{"line_number":1118,"context_line":"            self.statsd.increment(\u0027partition.lock-failure.count\u0027)"},{"line_number":1119,"context_line":"            self.handoffs_remaining +\u003d 1"},{"line_number":1120,"context_line":"        self.statsd.timing_since(\u0027partition.delete.timing\u0027, begin)"},{"line_number":1121,"context_line":""},{"line_number":1122,"context_line":"    def _get_part_jobs(self, local_dev, part_path, partition, policy):"},{"line_number":1123,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":40,"id":"8cdc9f8c_6960d323","line":1120,"in_reply_to":"90881a17_a5972bc3","updated":"2024-09-23 19:08:03.000000000","message":"Acknowledged","commit_id":"0ae2ed1fcf7ab7f21ee28b5372aa8096f0bdc201"}],"swift/obj/replicator.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"ca185e484f3c640b91b5c88330add99dd0d394ad","unresolved":true,"context_lines":[{"line_number":131,"context_line":"        \"\"\""},{"line_number":132,"context_line":"        self.conf \u003d conf"},{"line_number":133,"context_line":"        self.logger \u003d get_prefixed_logger("},{"line_number":134,"context_line":"            logger or get_logger(conf, log_route\u003d\u0027object-replicator\u0027), {})"},{"line_number":135,"context_line":"        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":136,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":137,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"}],"source_content_type":"text/x-python","patch_set":33,"id":"df6fe057_ade9ae7e","line":134,"range":{"start_line":134,"start_character":22,"end_line":134,"end_character":32},"updated":"2024-09-11 04:11:55.000000000","message":"So this patch sepeates but we keep using the hybrid logger for now?\n\nWhich is fine, so follow up patches is where we\u0027ll start spliting them out in upstream swift?","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"f39485ce50fd147a787f80b07de87c25e00b4c61","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        \"\"\""},{"line_number":132,"context_line":"        self.conf \u003d conf"},{"line_number":133,"context_line":"        self.logger \u003d get_prefixed_logger("},{"line_number":134,"context_line":"            logger or get_logger(conf, log_route\u003d\u0027object-replicator\u0027), {})"},{"line_number":135,"context_line":"        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":136,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":137,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"}],"source_content_type":"text/x-python","patch_set":33,"id":"41ace52b_1434b9e9","line":134,"range":{"start_line":134,"start_character":22,"end_line":134,"end_character":32},"in_reply_to":"df6fe057_ade9ae7e","updated":"2024-09-11 14:01:02.000000000","message":"Yes, And I did test that get_statsd_client and get_adapted_logger as loggers work just fine and at least all tests pass.","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"371d43e55eb849a0d0a3934f03357d737953902a","unresolved":true,"context_lines":[{"line_number":132,"context_line":"        self.conf \u003d conf"},{"line_number":133,"context_line":"        self.logger \u003d get_prefixed_logger("},{"line_number":134,"context_line":"            logger or get_logger(conf, log_route\u003d\u0027object-replicator\u0027), {})"},{"line_number":135,"context_line":"        self.logger \u003d self.logger.logger"},{"line_number":136,"context_line":"        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":137,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":138,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"}],"source_content_type":"text/x-python","patch_set":38,"id":"91b3178a_7a6054a7","line":135,"updated":"2024-09-18 12:36:40.000000000","message":"looks wrong, caused by bug in get_prefixed_logger","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d79d542ad98863b6fc2ae11559e41dc2e4901eda","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        self.conf \u003d conf"},{"line_number":133,"context_line":"        self.logger \u003d get_prefixed_logger("},{"line_number":134,"context_line":"            logger or get_logger(conf, log_route\u003d\u0027object-replicator\u0027), {})"},{"line_number":135,"context_line":"        self.logger \u003d self.logger.logger"},{"line_number":136,"context_line":"        self.devices_dir \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":137,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":138,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"}],"source_content_type":"text/x-python","patch_set":38,"id":"d2439ff9_9563a9f7","line":135,"in_reply_to":"91b3178a_7a6054a7","updated":"2024-09-18 20:57:03.000000000","message":"Done","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"}],"test/debug_logger.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7527eeba61016ee6907c090e51c13d747bef2c2e","unresolved":true,"context_lines":[{"line_number":159,"context_line":"        self.level \u003d logging.NOTSET"},{"line_number":160,"context_line":"        if \u0027facility\u0027 in kwargs:"},{"line_number":161,"context_line":"            self.facility \u003d kwargs[\u0027facility\u0027]"},{"line_number":162,"context_line":"        self.statsd_client \u003d FakeStatsdClient(\u0027host\u0027, 8125)"},{"line_number":163,"context_line":"        self.thread_locals \u003d None"},{"line_number":164,"context_line":"        self.parent \u003d None"},{"line_number":165,"context_line":"        # ensure the NOTICE level has been named, in case it has not already"}],"source_content_type":"text/x-python","patch_set":28,"id":"b2b96817_844c328e","line":162,"updated":"2024-08-27 22:53:17.000000000","message":"We can drop this now. (Right?)","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"c0f2da970fc99d4518b2f67375e79a85b4eec160","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        self.level \u003d logging.NOTSET"},{"line_number":160,"context_line":"        if \u0027facility\u0027 in kwargs:"},{"line_number":161,"context_line":"            self.facility \u003d kwargs[\u0027facility\u0027]"},{"line_number":162,"context_line":"        self.statsd_client \u003d FakeStatsdClient(\u0027host\u0027, 8125)"},{"line_number":163,"context_line":"        self.thread_locals \u003d None"},{"line_number":164,"context_line":"        self.parent \u003d None"},{"line_number":165,"context_line":"        # ensure the NOTICE level has been named, in case it has not already"}],"source_content_type":"text/x-python","patch_set":28,"id":"9d651a95_6f0eb7d9","line":162,"in_reply_to":"b2b96817_844c328e","updated":"2024-08-28 15:54:02.000000000","message":"Ah yess!!","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7527eeba61016ee6907c090e51c13d747bef2c2e","unresolved":true,"context_lines":[{"line_number":265,"context_line":"    def __getattribute__(self, name):"},{"line_number":266,"context_line":"        try:"},{"line_number":267,"context_line":"            if name \u003d\u003d \u0027statsd_client\u0027:"},{"line_number":268,"context_line":"                raise ValueError(\"the name is statsd_client\")"},{"line_number":269,"context_line":"            return object.__getattribute__(self, name)"},{"line_number":270,"context_line":"        except AttributeError:"},{"line_number":271,"context_line":"            return getattr(self.__dict__[\u0027logger\u0027], name)"}],"source_content_type":"text/x-python","patch_set":28,"id":"998d5951_9ce46206","line":268,"updated":"2024-08-27 22:53:17.000000000","message":"??","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"c0f2da970fc99d4518b2f67375e79a85b4eec160","unresolved":false,"context_lines":[{"line_number":265,"context_line":"    def __getattribute__(self, name):"},{"line_number":266,"context_line":"        try:"},{"line_number":267,"context_line":"            if name \u003d\u003d \u0027statsd_client\u0027:"},{"line_number":268,"context_line":"                raise ValueError(\"the name is statsd_client\")"},{"line_number":269,"context_line":"            return object.__getattribute__(self, name)"},{"line_number":270,"context_line":"        except AttributeError:"},{"line_number":271,"context_line":"            return getattr(self.__dict__[\u0027logger\u0027], name)"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba52530a_bd122906","line":268,"in_reply_to":"998d5951_9ce46206","updated":"2024-08-28 15:54:02.000000000","message":"Some tests were failing in previous patches and hence I had a temporary fix here. Fixed that and removed these lines now.","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7527eeba61016ee6907c090e51c13d747bef2c2e","unresolved":true,"context_lines":[{"line_number":271,"context_line":"            return getattr(self.__dict__[\u0027logger\u0027], name)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"class DebugLoggerStatsdFacade(utils.LoggerStatsdFacade):"},{"line_number":275,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":276,"context_line":"        super(DebugLoggerStatsdFacade, self).__init__(*args, **kwargs)"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"a7f17f55_66808908","line":274,"updated":"2024-08-27 22:53:17.000000000","message":"Would it be better to have *this* class be the one that forwards `get_increment_counts`? I think it\u0027d look something like\n```\nclass DebugLoggerStatsdFacade(utils.LoggerStatsdFacade):\n    STATSD_CLIENT_METHODS \u003d utils.LoggerStatsdFacade.STATSD_CLIENT_METHODS + (\n        \u0027get_increment_counts\u0027,)\n```","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"c0f2da970fc99d4518b2f67375e79a85b4eec160","unresolved":false,"context_lines":[{"line_number":271,"context_line":"            return getattr(self.__dict__[\u0027logger\u0027], name)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"class DebugLoggerStatsdFacade(utils.LoggerStatsdFacade):"},{"line_number":275,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":276,"context_line":"        super(DebugLoggerStatsdFacade, self).__init__(*args, **kwargs)"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"69301828_4af8bad0","line":274,"in_reply_to":"a7f17f55_66808908","updated":"2024-08-28 15:54:02.000000000","message":"Acknowledged","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e4423839129427459f8851b2bc3ed58f09aa6390","unresolved":true,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":"class DebugLoggerStatsdFacade(utils.LoggerStatsdFacade):"},{"line_number":274,"context_line":"    STATSD_CLIENT_METHODS \u003d utils.LoggerStatsdFacade.STATSD_CLIENT_METHODS + ("},{"line_number":275,"context_line":"        \u0027get_increment_counts\u0027, \u0027set_prefix\u0027)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":278,"context_line":"        super(DebugLoggerStatsdFacade, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":37,"id":"572b577b_5497458a","line":275,"range":{"start_line":275,"start_character":32,"end_line":275,"end_character":44},"updated":"2024-09-17 18:03:58.000000000","message":"this is problematic because the logger also has a set_prefix method, and that has something to do with the tests that fail because the logged message doesn\u0027t have the expected prefix, but I\u0027ve not worked out the workaround yet.\n\nmodifying the facade like this, changing STATSD_CLIENT_METHODS, makes me nervous, we should think of a better way.","commit_id":"44c983f8f67710ac815554edd35ab6fd0d708144"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ffd455e7049fe46c6ca61f7705cb50e9b1f2d5d6","unresolved":false,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":"class DebugLoggerStatsdFacade(utils.LoggerStatsdFacade):"},{"line_number":274,"context_line":"    STATSD_CLIENT_METHODS \u003d utils.LoggerStatsdFacade.STATSD_CLIENT_METHODS + ("},{"line_number":275,"context_line":"        \u0027get_increment_counts\u0027, \u0027set_prefix\u0027)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":278,"context_line":"        super(DebugLoggerStatsdFacade, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":37,"id":"d35ee0c1_bebaaabe","line":275,"range":{"start_line":275,"start_character":32,"end_line":275,"end_character":44},"in_reply_to":"572b577b_5497458a","updated":"2024-09-23 19:08:03.000000000","message":"Removed and Resolved","commit_id":"44c983f8f67710ac815554edd35ab6fd0d708144"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"94ba6197988861b3d78e634b05a38cb43d7ad7ba","unresolved":true,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":"class DebugLoggerStatsdFacade(utils.LoggerStatsdFacade):"},{"line_number":274,"context_line":"    STATSD_CLIENT_METHODS \u003d utils.LoggerStatsdFacade.STATSD_CLIENT_METHODS + ("},{"line_number":275,"context_line":"        \u0027get_increment_counts\u0027, )"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":278,"context_line":"        super(DebugLoggerStatsdFacade, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":42,"id":"b5376f62_40c23ee7","line":275,"updated":"2024-09-24 17:12:25.000000000","message":"I\u0027m not sure if I like this or not. We may add more \"captured calls introspection helpers\" to the debug statsd client in the future, and this pattern would require them to be added here too.\n\nThe alternative would be to have tests explicitly access the LogStatsdFacade.statsd_client object to call get_increment_counts.","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"48236fbac3b8bcf6c79874284013d17f50792120","unresolved":false,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":"class DebugLoggerStatsdFacade(utils.LoggerStatsdFacade):"},{"line_number":274,"context_line":"    STATSD_CLIENT_METHODS \u003d utils.LoggerStatsdFacade.STATSD_CLIENT_METHODS + ("},{"line_number":275,"context_line":"        \u0027get_increment_counts\u0027, )"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":278,"context_line":"        super(DebugLoggerStatsdFacade, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":42,"id":"e077ebaa_d651d1d3","line":275,"in_reply_to":"b5376f62_40c23ee7","updated":"2024-09-26 13:26:42.000000000","message":"Acknowledged","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a3a37fa36504001bf9e6cfe48ed0c681a3c4885f","unresolved":true,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":"class DebugLoggerStatsdFacade(utils.LoggerStatsdFacade):"},{"line_number":274,"context_line":"    STATSD_CLIENT_METHODS \u003d utils.LoggerStatsdFacade.STATSD_CLIENT_METHODS + ("},{"line_number":275,"context_line":"        \u0027get_increment_counts\u0027, )"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":278,"context_line":"        super(DebugLoggerStatsdFacade, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":42,"id":"8ba4544b_9f58365b","line":275,"in_reply_to":"b5376f62_40c23ee7","updated":"2024-09-25 15:58:20.000000000","message":"I like the idea of updating tests to to call any methods specific to the Fake on the Fake directly rather than having the Facade also double as a test helper.","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"94ba6197988861b3d78e634b05a38cb43d7ad7ba","unresolved":true,"context_lines":[{"line_number":277,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":278,"context_line":"        super(DebugLoggerStatsdFacade, self).__init__(*args, **kwargs)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def clear(self):"},{"line_number":281,"context_line":"        self.logger.clear()         # DebugLogAdapter"},{"line_number":282,"context_line":"        self.logger.statsd_client.clear()  # FakeStatsdClient"},{"line_number":283,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"5d1b9a85_5e6dbf66","line":280,"updated":"2024-09-24 17:12:25.000000000","message":"does this definitely get called, or does the ``LoggerStatsdFacade.__getattr__`` end up forwarding the call to ``_logger.clear()`` *only*? I\u0027m not sure what the precedence is for ``__getattr__`` vs a bound method.","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"48236fbac3b8bcf6c79874284013d17f50792120","unresolved":false,"context_lines":[{"line_number":277,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":278,"context_line":"        super(DebugLoggerStatsdFacade, self).__init__(*args, **kwargs)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def clear(self):"},{"line_number":281,"context_line":"        self.logger.clear()         # DebugLogAdapter"},{"line_number":282,"context_line":"        self.logger.statsd_client.clear()  # FakeStatsdClient"},{"line_number":283,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"eae56eb5_24b7db9a","line":280,"in_reply_to":"5d1b9a85_5e6dbf66","updated":"2024-09-26 13:26:42.000000000","message":"I put some gibberish in this method and 825 tests failed so I think this definitely gets called.","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a3a37fa36504001bf9e6cfe48ed0c681a3c4885f","unresolved":true,"context_lines":[{"line_number":277,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":278,"context_line":"        super(DebugLoggerStatsdFacade, self).__init__(*args, **kwargs)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def clear(self):"},{"line_number":281,"context_line":"        self.logger.clear()         # DebugLogAdapter"},{"line_number":282,"context_line":"        self.logger.statsd_client.clear()  # FakeStatsdClient"},{"line_number":283,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"5a31ed3e_ba0ffa2a","line":280,"in_reply_to":"5d1b9a85_5e6dbf66","updated":"2024-09-25 15:58:20.000000000","message":"it seems like `__getattr__` only gets called if the object itself doesn\u0027t have such an attribute?\n\n```\n(nvidia) clayg@banana:~/Workspace/scratch/getattr$ cat test.py \nimport unittest\n\n\nclass Wrapped(object):\n\n    def __init__(self):\n        self.wrapped_attr \u003d 3\n        self.override_attr \u003d 4\n\n    def wrapped_method(self):\n        return 1\n\n    def override_method(self):\n        return 2\n\n\nclass Facade(object):\n\n    def __init__(self, wrapped):\n        self.wrapped \u003d wrapped\n        self.override_attr \u003d 5\n\n    def __getattr__(self, attr):\n        return getattr(self.wrapped, attr)\n\n    def override_method(self):\n        return 0\n\n\nclass TestFacadeCase(unittest.TestCase):\n\n    def test_wrapped_getattr_precedence(self):\n        w \u003d Wrapped()\n        f \u003d Facade(w)\n        self.assertEqual(1, f.wrapped_method())\n        self.assertEqual(0, f.override_method())\n        self.assertEqual(3, f.wrapped_attr)\n        self.assertEqual(5, f.override_attr)\n(nvidia) clayg@banana:~/Workspace/scratch/getattr$ python -m unittest test.py \n.\n----------------------------------------------------------------------\nRan 1 test in 0.000s\n\nOK\n```","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"94ba6197988861b3d78e634b05a38cb43d7ad7ba","unresolved":true,"context_lines":[{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def clear(self):"},{"line_number":281,"context_line":"        self.logger.clear()         # DebugLogAdapter"},{"line_number":282,"context_line":"        self.logger.statsd_client.clear()  # FakeStatsdClient"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"def debug_logger(name\u003d\u0027test\u0027):"}],"source_content_type":"text/x-python","patch_set":42,"id":"f5cde157_ce67dff6","line":282,"updated":"2024-09-24 17:12:25.000000000","message":"this could be ``self.statsd_client.clear()`` I think?","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"48236fbac3b8bcf6c79874284013d17f50792120","unresolved":false,"context_lines":[{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def clear(self):"},{"line_number":281,"context_line":"        self.logger.clear()         # DebugLogAdapter"},{"line_number":282,"context_line":"        self.logger.statsd_client.clear()  # FakeStatsdClient"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"def debug_logger(name\u003d\u0027test\u0027):"}],"source_content_type":"text/x-python","patch_set":42,"id":"6659ef21_50f8f366","line":282,"in_reply_to":"f5cde157_ce67dff6","updated":"2024-09-26 13:26:42.000000000","message":"Acknowledged","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"}],"test/probe/test_reconstructor_rebuild.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"94ba6197988861b3d78e634b05a38cb43d7ad7ba","unresolved":true,"context_lines":[{"line_number":426,"context_line":"            reconstructor \u003d self.run_custom_daemon("},{"line_number":427,"context_line":"                ObjectReconstructor, \u0027object-reconstructor\u0027, conf_index,"},{"line_number":428,"context_line":"                {\u0027quarantine_age\u0027: \u00270\u0027})"},{"line_number":429,"context_line":"            logger \u003d reconstructor.logger"},{"line_number":430,"context_line":"            error_lines.append(logger.get_lines_for_level(\u0027error\u0027))"},{"line_number":431,"context_line":"            warning_lines.append(logger.get_lines_for_level(\u0027warning\u0027))"},{"line_number":432,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"86425529_89a51996","line":429,"updated":"2024-09-24 17:12:25.000000000","message":"+1. these test changes DO make sense because we have removed one layer of wrapping (no more PrefixLogAdapter)","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"48236fbac3b8bcf6c79874284013d17f50792120","unresolved":false,"context_lines":[{"line_number":426,"context_line":"            reconstructor \u003d self.run_custom_daemon("},{"line_number":427,"context_line":"                ObjectReconstructor, \u0027object-reconstructor\u0027, conf_index,"},{"line_number":428,"context_line":"                {\u0027quarantine_age\u0027: \u00270\u0027})"},{"line_number":429,"context_line":"            logger \u003d reconstructor.logger"},{"line_number":430,"context_line":"            error_lines.append(logger.get_lines_for_level(\u0027error\u0027))"},{"line_number":431,"context_line":"            warning_lines.append(logger.get_lines_for_level(\u0027warning\u0027))"},{"line_number":432,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"6e962c1d_5fbbc185","line":429,"in_reply_to":"86425529_89a51996","updated":"2024-09-26 13:26:42.000000000","message":"Done","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"fca9ec8d6734d516d63f0627028d18f48e85e972","unresolved":true,"context_lines":[{"line_number":426,"context_line":"            reconstructor \u003d self.run_custom_daemon("},{"line_number":427,"context_line":"                ObjectReconstructor, \u0027object-reconstructor\u0027, conf_index,"},{"line_number":428,"context_line":"                {\u0027quarantine_age\u0027: \u00270\u0027})"},{"line_number":429,"context_line":"            logger \u003d reconstructor.logger.logger"},{"line_number":430,"context_line":"            error_lines.append(logger.get_lines_for_level(\u0027error\u0027))"},{"line_number":431,"context_line":"            warning_lines.append(logger.get_lines_for_level(\u0027warning\u0027))"},{"line_number":432,"context_line":""}],"source_content_type":"text/x-python","patch_set":45,"id":"ad4be14c_7430bdc2","side":"PARENT","line":429,"updated":"2024-09-30 18:08:05.000000000","message":"this change doesn\u0027t seem needed; I\u0027d suggest we save it for a follow-up change:\n\n```\npytest swift/test/probe/test_reconstructor_rebuild.py -vsx\n...\n7 passed\n```","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d4599d5a72512155a8c56c5471b43f7105f6fa0b","unresolved":false,"context_lines":[{"line_number":426,"context_line":"            reconstructor \u003d self.run_custom_daemon("},{"line_number":427,"context_line":"                ObjectReconstructor, \u0027object-reconstructor\u0027, conf_index,"},{"line_number":428,"context_line":"                {\u0027quarantine_age\u0027: \u00270\u0027})"},{"line_number":429,"context_line":"            logger \u003d reconstructor.logger.logger"},{"line_number":430,"context_line":"            error_lines.append(logger.get_lines_for_level(\u0027error\u0027))"},{"line_number":431,"context_line":"            warning_lines.append(logger.get_lines_for_level(\u0027warning\u0027))"},{"line_number":432,"context_line":""}],"source_content_type":"text/x-python","patch_set":45,"id":"5864ef01_02c0c482","side":"PARENT","line":429,"in_reply_to":"ad4be14c_7430bdc2","updated":"2024-10-01 14:16:34.000000000","message":"Acknowledged","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"}],"test/unit/account/test_auditor.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"371d43e55eb849a0d0a3934f03357d737953902a","unresolved":true,"context_lines":[{"line_number":138,"context_line":"            {\u0027failures\u0027: 1})"},{"line_number":139,"context_line":"        self.assertIn("},{"line_number":140,"context_line":"            (b\u0027account-auditor.failures:1|c\u0027, (\u0027host\u0027, 8125)),"},{"line_number":141,"context_line":"            test_auditor.logger.logger.statsd_client.sendto_calls)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":38,"id":"aaa86d43_00c0916a","line":141,"updated":"2024-09-18 12:36:40.000000000","message":"this change isn\u0027t necessary\n\nLoggerStatsdFacade.logger.statsd_client is same as LoggerStatsdFacade.statsd_client","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d79d542ad98863b6fc2ae11559e41dc2e4901eda","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            {\u0027failures\u0027: 1})"},{"line_number":139,"context_line":"        self.assertIn("},{"line_number":140,"context_line":"            (b\u0027account-auditor.failures:1|c\u0027, (\u0027host\u0027, 8125)),"},{"line_number":141,"context_line":"            test_auditor.logger.logger.statsd_client.sendto_calls)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":38,"id":"473aa37c_d9aa8658","line":141,"in_reply_to":"aaa86d43_00c0916a","updated":"2024-09-18 20:57:03.000000000","message":"Agreed and done","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"}],"test/unit/common/middleware/test_tempurl.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"371d43e55eb849a0d0a3934f03357d737953902a","unresolved":true,"context_lines":[{"line_number":226,"context_line":"        # valid sig should be exactly 40 hex chars"},{"line_number":227,"context_line":"        sig \u003d \u0027deadbeefdeadbeefdeadbeefdeadbeefdeadbeef\u0027"},{"line_number":228,"context_line":"        expires \u003d int(time() + 1000)"},{"line_number":229,"context_line":"        p_logging.access_logger.logger \u003d debug_logger(\u0027fake\u0027)"},{"line_number":230,"context_line":"        resp \u003d self._make_request("},{"line_number":231,"context_line":"            \u0027/v1/a/c/o?temp_url_sig\u003d%s\u0026temp_url_expires\u003d%d\u0027 % (sig, expires))"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"8acff608_c21a9c74","side":"PARENT","line":229,"range":{"start_line":229,"start_character":18,"end_line":229,"end_character":38},"updated":"2024-09-18 12:36:40.000000000","message":"ok. this looked wonky anyway, why was the test replacing the Logger instance with a LogAdapter instance?","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d79d542ad98863b6fc2ae11559e41dc2e4901eda","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        # valid sig should be exactly 40 hex chars"},{"line_number":227,"context_line":"        sig \u003d \u0027deadbeefdeadbeefdeadbeefdeadbeefdeadbeef\u0027"},{"line_number":228,"context_line":"        expires \u003d int(time() + 1000)"},{"line_number":229,"context_line":"        p_logging.access_logger.logger \u003d debug_logger(\u0027fake\u0027)"},{"line_number":230,"context_line":"        resp \u003d self._make_request("},{"line_number":231,"context_line":"            \u0027/v1/a/c/o?temp_url_sig\u003d%s\u0026temp_url_expires\u003d%d\u0027 % (sig, expires))"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"de226b5b_d7bfe287","side":"PARENT","line":229,"range":{"start_line":229,"start_character":18,"end_line":229,"end_character":38},"in_reply_to":"8acff608_c21a9c74","updated":"2024-09-18 20:57:03.000000000","message":"Done","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"94ba6197988861b3d78e634b05a38cb43d7ad7ba","unresolved":true,"context_lines":[{"line_number":226,"context_line":"        # valid sig should be exactly 40 hex chars"},{"line_number":227,"context_line":"        sig \u003d \u0027deadbeefdeadbeefdeadbeefdeadbeefdeadbeef\u0027"},{"line_number":228,"context_line":"        expires \u003d int(time() + 1000)"},{"line_number":229,"context_line":"        p_logging.access_logger.logger \u003d debug_logger(\u0027fake\u0027)"},{"line_number":230,"context_line":"        resp \u003d self._make_request("},{"line_number":231,"context_line":"            \u0027/v1/a/c/o?temp_url_sig\u003d%s\u0026temp_url_expires\u003d%d\u0027 % (sig, expires))"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"237daa6e_97183c81","side":"PARENT","line":229,"updated":"2024-09-24 17:12:25.000000000","message":"that\u0027s curious, we were replacing the wrapped logging.Logger with debug_logger :shrug:","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"48236fbac3b8bcf6c79874284013d17f50792120","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        # valid sig should be exactly 40 hex chars"},{"line_number":227,"context_line":"        sig \u003d \u0027deadbeefdeadbeefdeadbeefdeadbeefdeadbeef\u0027"},{"line_number":228,"context_line":"        expires \u003d int(time() + 1000)"},{"line_number":229,"context_line":"        p_logging.access_logger.logger \u003d debug_logger(\u0027fake\u0027)"},{"line_number":230,"context_line":"        resp \u003d self._make_request("},{"line_number":231,"context_line":"            \u0027/v1/a/c/o?temp_url_sig\u003d%s\u0026temp_url_expires\u003d%d\u0027 % (sig, expires))"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"bb7ef540_437527a1","side":"PARENT","line":229,"in_reply_to":"237daa6e_97183c81","updated":"2024-09-26 13:26:42.000000000","message":"Hmm, interesting. I set logging.Logger as debug logger and that works too! We may not need this change !","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"}],"test/unit/common/test_internal_client.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"fca9ec8d6734d516d63f0627028d18f48e85e972","unresolved":true,"context_lines":[{"line_number":529,"context_line":"                self.use_replication_network \u003d False"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"        fake_logger \u003d debug_logger()"},{"line_number":532,"context_line":"        logger \u003d utils.LogAdapter(fake_logger, \u0027test-server\u0027)"},{"line_number":533,"context_line":"        # Make sure there\u0027s no transaction ID set -- other tests may have"},{"line_number":534,"context_line":"        # polluted the logger"},{"line_number":535,"context_line":"        logger.txn_id \u003d None"}],"source_content_type":"text/x-python","patch_set":45,"id":"25f15414_bee77eba","side":"PARENT","line":532,"updated":"2024-09-30 18:08:05.000000000","message":"I\u0027m not sure this wrapping makes much sense; it\u0027s not needed\n\n```\n(vagrant-swift-all-in-one) clayg@banana:~/Workspace/vagrant-swift-all-in-one/swift$ git diff !$\ngit diff test/unit/common/test_internal_client.py\ndiff --git a/test/unit/common/test_internal_client.py b/test/unit/common/test_internal_client.py\nindex ffd7cdc03..2c966bdbb 100644\n--- a/test/unit/common/test_internal_client.py\n+++ b/test/unit/common/test_internal_client.py\n@@ -528,8 +528,7 @@ class TestInternalClient(unittest.TestCase):\n                 self.request_tries \u003d 1\n                 self.use_replication_network \u003d False\n \n-        fake_logger \u003d debug_logger()\n-        logger \u003d utils.SwiftLogAdapter(fake_logger, \u0027test-server\u0027)\n+        logger \u003d debug_logger()\n         # Make sure there\u0027s no transaction ID set -- other tests may have\n         # polluted the logger\n         logger.txn_id \u003d None\n@@ -538,7 +537,7 @@ class TestInternalClient(unittest.TestCase):\n         client.make_request(\u0027GET\u0027, \u0027/\u0027, {}, (200,))\n         logger.debug(\u0027After request\u0027)\n         self.assertEqual([(args[0], kwargs[\u0027extra\u0027].get(\u0027txn_id\u0027))\n-                          for args, kwargs in fake_logger.log_dict[\u0027debug\u0027]], [\n+                          for args, kwargs in logger.log_dict[\u0027debug\u0027]], [\n             (\u0027Before request\u0027, None),\n             (\u0027Inside of request\u0027, \u0027foo\u0027),\n             (\u0027After request\u0027, None),\n```\n\n^ this should remove the need to import utils in this test module","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d4599d5a72512155a8c56c5471b43f7105f6fa0b","unresolved":false,"context_lines":[{"line_number":529,"context_line":"                self.use_replication_network \u003d False"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"        fake_logger \u003d debug_logger()"},{"line_number":532,"context_line":"        logger \u003d utils.LogAdapter(fake_logger, \u0027test-server\u0027)"},{"line_number":533,"context_line":"        # Make sure there\u0027s no transaction ID set -- other tests may have"},{"line_number":534,"context_line":"        # polluted the logger"},{"line_number":535,"context_line":"        logger.txn_id \u003d None"}],"source_content_type":"text/x-python","patch_set":45,"id":"577d48b6_68a2e258","side":"PARENT","line":532,"in_reply_to":"25f15414_bee77eba","updated":"2024-10-01 14:16:34.000000000","message":"Acknowledged","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"}],"test/unit/common/test_statsd.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"from test.debug_logger import debug_logger"},{"line_number":34,"context_line":"from test.unit.common.test_utils import MockUdpSocket, reset_logger_state"},{"line_number":35,"context_line":"from swift.common import statsd_client as csc"},{"line_number":36,"context_line":"from swift.common.swob import Response"},{"line_number":37,"context_line":"from swift.obj.reconstructor import HybridMultiObjectDispatcher"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"077a160a_37af825a","line":35,"updated":"2024-05-02 19:13:15.000000000","message":"I don\u0027t love the csc alias here,  I think `statsd_client.socket` would be fine and is sufficiently unambigous from `logger.statsd_client`","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"6b1b46e6cdf0885d74878e75664114e80de3ec5d","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"from test.debug_logger import debug_logger"},{"line_number":34,"context_line":"from test.unit.common.test_utils import MockUdpSocket, reset_logger_state"},{"line_number":35,"context_line":"from swift.common import statsd_client as csc"},{"line_number":36,"context_line":"from swift.common.swob import Response"},{"line_number":37,"context_line":"from swift.obj.reconstructor import HybridMultiObjectDispatcher"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"cda43dc0_1af4e86d","line":35,"in_reply_to":"077a160a_37af825a","updated":"2024-05-07 20:18:42.000000000","message":"I got a few errors with the same name hence naming it as client_statsd.socket and letting logger.statsd_client be","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":34,"context_line":"from test.unit.common.test_utils import MockUdpSocket, reset_logger_state"},{"line_number":35,"context_line":"from swift.common import statsd_client as csc"},{"line_number":36,"context_line":"from swift.common.swob import Response"},{"line_number":37,"context_line":"from swift.obj.reconstructor import HybridMultiObjectDispatcher"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class TestStatsdLogging(unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":6,"id":"baf9b3dc_741bb5c3","line":37,"updated":"2024-05-02 19:13:15.000000000","message":"ok yeah, let\u0027s not define this in the Reconstructor...","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"6b1b46e6cdf0885d74878e75664114e80de3ec5d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"from test.unit.common.test_utils import MockUdpSocket, reset_logger_state"},{"line_number":35,"context_line":"from swift.common import statsd_client as csc"},{"line_number":36,"context_line":"from swift.common.swob import Response"},{"line_number":37,"context_line":"from swift.obj.reconstructor import HybridMultiObjectDispatcher"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class TestStatsdLogging(unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":6,"id":"2eaa5434_f1578edb","line":37,"in_reply_to":"baf9b3dc_741bb5c3","updated":"2024-05-07 20:18:42.000000000","message":"Acknowledged","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":70,"context_line":"                                  \u0027some-name\u0027, log_route\u003d\u0027some-route\u0027)"},{"line_number":71,"context_line":"        # white-box construction validation"},{"line_number":72,"context_line":"        self.assertIsInstance(logger.logger.statsd_client,"},{"line_number":73,"context_line":"                              csc.StatsdClient)"},{"line_number":74,"context_line":"        self.assertEqual(logger.logger.statsd_client.host,"},{"line_number":75,"context_line":"                         \u0027some.host.com\u0027)"},{"line_number":76,"context_line":"        self.assertEqual(logger.logger.statsd_client.port, 8125)"}],"source_content_type":"text/x-python","patch_set":6,"id":"c41dcf7c_0ab72fa5","line":73,"updated":"2024-05-02 19:13:15.000000000","message":"I imagine once logger is an instance of a HybridMultiDispatchObject this kind of asserts might get a bit tricky.\n\nPerhaps we should define `HybridMultiDispatchObject.__init__(self, **objs)` so that all objs are *named* and code on the other side of the interface can still say:\n\n    hmdo \u003d HybridMultiDispatchObject(my_thing\u003dFoo())\n    self.assertIsInstance(hmdo._objs[\u0027my_thing\u0027], Foo)","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"054d1fde17e13a9824e9319c72a05b94b4bccdc2","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                                  \u0027some-name\u0027, log_route\u003d\u0027some-route\u0027)"},{"line_number":71,"context_line":"        # white-box construction validation"},{"line_number":72,"context_line":"        self.assertIsInstance(logger.logger.statsd_client,"},{"line_number":73,"context_line":"                              csc.StatsdClient)"},{"line_number":74,"context_line":"        self.assertEqual(logger.logger.statsd_client.host,"},{"line_number":75,"context_line":"                         \u0027some.host.com\u0027)"},{"line_number":76,"context_line":"        self.assertEqual(logger.logger.statsd_client.port, 8125)"}],"source_content_type":"text/x-python","patch_set":6,"id":"4c039683_b3f8449e","line":73,"in_reply_to":"c41dcf7c_0ab72fa5","updated":"2024-05-29 19:23:29.000000000","message":"Acknowledged","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"614389f4143c35f9ea66e39c2bd4bf57b90cb5a5","unresolved":true,"context_lines":[{"line_number":726,"context_line":"            \u0027log_statsd_port\u0027: str(self.port),"},{"line_number":727,"context_line":"            \u0027log_statsd_metric_prefix\u0027: \u0027alpha.beta\u0027})"},{"line_number":728,"context_line":""},{"line_number":729,"context_line":"        self.multi_logger \u003d HybridMultiObjectDispatcher(statsd, getlogger)"},{"line_number":730,"context_line":"        self.assertStat(\u0027alpha.beta.some.counter:1|c\u0027,"},{"line_number":731,"context_line":"                        self.multi_logger.increment, \u0027some.counter\u0027)"},{"line_number":732,"context_line":"        self.assertStat(\u0027alpha.beta.some.counter:-1|c\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7e764d42_44dcaab3","line":729,"updated":"2024-05-02 19:13:15.000000000","message":"... and maybe let\u0027s not test it as part of statsd_client","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"9267720323df2f9cc43cbe1cc4b161e8c7376520","unresolved":false,"context_lines":[{"line_number":726,"context_line":"            \u0027log_statsd_port\u0027: str(self.port),"},{"line_number":727,"context_line":"            \u0027log_statsd_metric_prefix\u0027: \u0027alpha.beta\u0027})"},{"line_number":728,"context_line":""},{"line_number":729,"context_line":"        self.multi_logger \u003d HybridMultiObjectDispatcher(statsd, getlogger)"},{"line_number":730,"context_line":"        self.assertStat(\u0027alpha.beta.some.counter:1|c\u0027,"},{"line_number":731,"context_line":"                        self.multi_logger.increment, \u0027some.counter\u0027)"},{"line_number":732,"context_line":"        self.assertStat(\u0027alpha.beta.some.counter:-1|c\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"c0e182cc_1b7d3466","line":729,"in_reply_to":"37581131_48d70596","updated":"2024-06-05 20:14:42.000000000","message":"Marking as done for now","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4b0ce629e546c5d589c103c11336480d3c155303","unresolved":true,"context_lines":[{"line_number":726,"context_line":"            \u0027log_statsd_port\u0027: str(self.port),"},{"line_number":727,"context_line":"            \u0027log_statsd_metric_prefix\u0027: \u0027alpha.beta\u0027})"},{"line_number":728,"context_line":""},{"line_number":729,"context_line":"        self.multi_logger \u003d HybridMultiObjectDispatcher(statsd, getlogger)"},{"line_number":730,"context_line":"        self.assertStat(\u0027alpha.beta.some.counter:1|c\u0027,"},{"line_number":731,"context_line":"                        self.multi_logger.increment, \u0027some.counter\u0027)"},{"line_number":732,"context_line":"        self.assertStat(\u0027alpha.beta.some.counter:-1|c\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"37581131_48d70596","line":729,"in_reply_to":"7e764d42_44dcaab3","updated":"2024-06-03 23:54:41.000000000","message":"I will have that as a follow-up patch. In future patches, I can change this test along with other logs/config tests.","commit_id":"1ddc9b010f324dde0d644c88333437ee39b2abff"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9bb01056ef419b1eba7bce17a0ece788e1c2586d","unresolved":true,"context_lines":[{"line_number":717,"context_line":"            \u0027log_statsd_host\u0027: \u0027localhost\u0027,"},{"line_number":718,"context_line":"            \u0027log_statsd_port\u0027: str(self.port),"},{"line_number":719,"context_line":"            \u0027log_statsd_metric_prefix\u0027: \u0027alpha.beta\u0027})"},{"line_number":720,"context_line":"        getlogger \u003d utils.get_logger({"},{"line_number":721,"context_line":"            \u0027log_statsd_host\u0027: \u0027localhost\u0027,"},{"line_number":722,"context_line":"            \u0027log_statsd_port\u0027: str(self.port),"},{"line_number":723,"context_line":"            \u0027log_statsd_metric_prefix\u0027: \u0027alpha.beta\u0027})"}],"source_content_type":"text/x-python","patch_set":10,"id":"ac46c862_96075004","line":720,"range":{"start_line":720,"start_character":20,"end_line":720,"end_character":36},"updated":"2024-05-15 23:39:30.000000000","message":"Not `logs.get_adapted_logger`?","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"054d1fde17e13a9824e9319c72a05b94b4bccdc2","unresolved":false,"context_lines":[{"line_number":717,"context_line":"            \u0027log_statsd_host\u0027: \u0027localhost\u0027,"},{"line_number":718,"context_line":"            \u0027log_statsd_port\u0027: str(self.port),"},{"line_number":719,"context_line":"            \u0027log_statsd_metric_prefix\u0027: \u0027alpha.beta\u0027})"},{"line_number":720,"context_line":"        getlogger \u003d utils.get_logger({"},{"line_number":721,"context_line":"            \u0027log_statsd_host\u0027: \u0027localhost\u0027,"},{"line_number":722,"context_line":"            \u0027log_statsd_port\u0027: str(self.port),"},{"line_number":723,"context_line":"            \u0027log_statsd_metric_prefix\u0027: \u0027alpha.beta\u0027})"}],"source_content_type":"text/x-python","patch_set":10,"id":"7661f010_907a1b66","line":720,"range":{"start_line":720,"start_character":20,"end_line":720,"end_character":36},"in_reply_to":"74b6f011_66b1771b","updated":"2024-05-29 19:23:29.000000000","message":"Disregard","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ed9c95505b7a3d793654ecc8617060c8d244b6a3","unresolved":false,"context_lines":[{"line_number":717,"context_line":"            \u0027log_statsd_host\u0027: \u0027localhost\u0027,"},{"line_number":718,"context_line":"            \u0027log_statsd_port\u0027: str(self.port),"},{"line_number":719,"context_line":"            \u0027log_statsd_metric_prefix\u0027: \u0027alpha.beta\u0027})"},{"line_number":720,"context_line":"        getlogger \u003d utils.get_logger({"},{"line_number":721,"context_line":"            \u0027log_statsd_host\u0027: \u0027localhost\u0027,"},{"line_number":722,"context_line":"            \u0027log_statsd_port\u0027: str(self.port),"},{"line_number":723,"context_line":"            \u0027log_statsd_metric_prefix\u0027: \u0027alpha.beta\u0027})"}],"source_content_type":"text/x-python","patch_set":10,"id":"74b6f011_66b1771b","line":720,"range":{"start_line":720,"start_character":20,"end_line":720,"end_character":36},"in_reply_to":"ac46c862_96075004","updated":"2024-05-29 19:21:39.000000000","message":"For backward compatibility, I\u0027ve aliased get_logger\u003dget_adapted_logger in utils.","commit_id":"6d07524caec6950ef83894914910910febf3ed9e"}],"test/unit/common/test_statsd_client.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7527eeba61016ee6907c090e51c13d747bef2c2e","unresolved":true,"context_lines":[{"line_number":148,"context_line":"            \u0027other-name\u0027, log_route\u003d\u0027some-route\u0027,"},{"line_number":149,"context_line":"            statsd_tail_prefix\u003d\u0027some-name.more-specific\u0027)"},{"line_number":150,"context_line":"        self.assertEqual(logger.logger.statsd_client._prefix,"},{"line_number":151,"context_line":"                         \u0027some-name.more-specific.\u0027)"},{"line_number":152,"context_line":"        self.assertEqual(logger2.logger.statsd_client._prefix,"},{"line_number":153,"context_line":"                         \u0027some-name.more-specific.\u0027)"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"77443624_c2511fee","side":"PARENT","line":151,"updated":"2024-08-27 22:53:17.000000000","message":"This seems like way more reasonable behavior!","commit_id":"e6b73612d1dcd0bace2361338e6ae82eb591282b"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"c0f2da970fc99d4518b2f67375e79a85b4eec160","unresolved":false,"context_lines":[{"line_number":148,"context_line":"            \u0027other-name\u0027, log_route\u003d\u0027some-route\u0027,"},{"line_number":149,"context_line":"            statsd_tail_prefix\u003d\u0027some-name.more-specific\u0027)"},{"line_number":150,"context_line":"        self.assertEqual(logger.logger.statsd_client._prefix,"},{"line_number":151,"context_line":"                         \u0027some-name.more-specific.\u0027)"},{"line_number":152,"context_line":"        self.assertEqual(logger2.logger.statsd_client._prefix,"},{"line_number":153,"context_line":"                         \u0027some-name.more-specific.\u0027)"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"df0c88e1_add809d5","side":"PARENT","line":151,"in_reply_to":"77443624_c2511fee","updated":"2024-08-28 15:54:02.000000000","message":"Done","commit_id":"e6b73612d1dcd0bace2361338e6ae82eb591282b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7527eeba61016ee6907c090e51c13d747bef2c2e","unresolved":true,"context_lines":[{"line_number":161,"context_line":"        self.assertEqual(logger.statsd_client._prefix,"},{"line_number":162,"context_line":"                         \u0027some-name.more-specific.\u0027)"},{"line_number":163,"context_line":"        self.assertEqual(logger2.statsd_client._prefix,"},{"line_number":164,"context_line":"                         \u0027other-name.\u0027)"},{"line_number":165,"context_line":"        with warnings.catch_warnings():"},{"line_number":166,"context_line":"            warnings.filterwarnings("},{"line_number":167,"context_line":"                \u0027ignore\u0027, r\u0027set_statsd_prefix\\(\\) is deprecated\u0027)"}],"source_content_type":"text/x-python","patch_set":28,"id":"03746952_30ed998e","line":164,"updated":"2024-08-27 22:53:17.000000000","message":"Also seems like a solid fix!","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"c0f2da970fc99d4518b2f67375e79a85b4eec160","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        self.assertEqual(logger.statsd_client._prefix,"},{"line_number":162,"context_line":"                         \u0027some-name.more-specific.\u0027)"},{"line_number":163,"context_line":"        self.assertEqual(logger2.statsd_client._prefix,"},{"line_number":164,"context_line":"                         \u0027other-name.\u0027)"},{"line_number":165,"context_line":"        with warnings.catch_warnings():"},{"line_number":166,"context_line":"            warnings.filterwarnings("},{"line_number":167,"context_line":"                \u0027ignore\u0027, r\u0027set_statsd_prefix\\(\\) is deprecated\u0027)"}],"source_content_type":"text/x-python","patch_set":28,"id":"eeaf84ca_101aa1a9","line":164,"in_reply_to":"03746952_30ed998e","updated":"2024-08-28 15:54:02.000000000","message":"Done","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"94ba6197988861b3d78e634b05a38cb43d7ad7ba","unresolved":true,"context_lines":[{"line_number":162,"context_line":"        self.assertEqual(logger.statsd_client._prefix,"},{"line_number":163,"context_line":"                         \u0027some-name.more-specific.\u0027)"},{"line_number":164,"context_line":"        self.assertEqual(logger2.statsd_client._prefix,"},{"line_number":165,"context_line":"                         \u0027other-name.\u0027)"},{"line_number":166,"context_line":"        with warnings.catch_warnings():"},{"line_number":167,"context_line":"            warnings.filterwarnings("},{"line_number":168,"context_line":"                \u0027ignore\u0027, r\u0027set_statsd_prefix\\(\\) is deprecated\u0027)"}],"source_content_type":"text/x-python","patch_set":42,"id":"185b7873_5f6ca14a","line":165,"updated":"2024-09-24 17:12:25.000000000","message":"I hadn\u0027t noticed this change before.\n\nThis is a significant change in behavior. The test is effectively asserting that all loggers that were instantiated with the same log_route have the *same* instance of a StatsdClient. So when set_statsd_prefix is called on one of them it changes the prefix on all of them.\n\nThis patch is changing that behavior. I think it is because:\n\nEach facade has its own statsd_client. \n\n```\nfacade1(log_route\u003dx) has statsd_client1 and logadapter1 which wraps logging.Logger instance logger1.\n\nfacade2(log_route\u003dx) has statsd_client2 and logadapter2 which wraps \nlogging.Logger instance logger1. \u003c--- NOTE: same as facade1\n\nWhen facade2 is created it sets logger1.statsd_client \u003d statsd_client2. But it does not (cannot) change facade1.statsd_client.\n\nAt which point facade1.statsd_client !\u003d facade1.logger.logger.statsd_client 😞\n```\n\nI\u0027m out of time today - perhaps you could write a test that verifies that ^^^ \n\nI\u0027d expect the same change to show up when get_logger is called with the preferred ``statsd_tail_prefix`` option...maybe we have no similar test coverage.\n\nA workaround would be for get_logger to check if the logger already has a statsd_client and re-use it for the new facade.","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a3a37fa36504001bf9e6cfe48ed0c681a3c4885f","unresolved":true,"context_lines":[{"line_number":162,"context_line":"        self.assertEqual(logger.statsd_client._prefix,"},{"line_number":163,"context_line":"                         \u0027some-name.more-specific.\u0027)"},{"line_number":164,"context_line":"        self.assertEqual(logger2.statsd_client._prefix,"},{"line_number":165,"context_line":"                         \u0027other-name.\u0027)"},{"line_number":166,"context_line":"        with warnings.catch_warnings():"},{"line_number":167,"context_line":"            warnings.filterwarnings("},{"line_number":168,"context_line":"                \u0027ignore\u0027, r\u0027set_statsd_prefix\\(\\) is deprecated\u0027)"}],"source_content_type":"text/x-python","patch_set":42,"id":"2958c289_b3fa7175","line":165,"in_reply_to":"185b7873_5f6ca14a","updated":"2024-09-25 15:58:20.000000000","message":"\u003e When facade2 is created it sets logger1.statsd_client \u003d statsd_client2\n\n^ I\u0027m really surprised to see this is correct; it\u0027s very convuluted in my mind to keep hanging the statsd_client reference off the facade\u0027s self.logger.logger (!!)\n\nI think we have talked about this behavior before and recognized we can\u0027t maintain it w/o having a cache of log_route to statsd_prefix (or I guess having a facade\u0027s logger still have a reference to a statsd_client)\n\nFWIW I think mutation of global state has lead to more \"unintended consequences for metric prefix naming\" than changing that behavior would; but I could be wrong, bug-for-bug compatibility may be worth the extra compatibility:\n\n930491: implement_spooky_action_at_distance | https://review.opendev.org/c/openstack/swift/+/930491","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"4d574a674c61558b69324bb320b26a9ca88fb392","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        self.assertEqual(logger.statsd_client._prefix,"},{"line_number":163,"context_line":"                         \u0027some-name.more-specific.\u0027)"},{"line_number":164,"context_line":"        self.assertEqual(logger2.statsd_client._prefix,"},{"line_number":165,"context_line":"                         \u0027other-name.\u0027)"},{"line_number":166,"context_line":"        with warnings.catch_warnings():"},{"line_number":167,"context_line":"            warnings.filterwarnings("},{"line_number":168,"context_line":"                \u0027ignore\u0027, r\u0027set_statsd_prefix\\(\\) is deprecated\u0027)"}],"source_content_type":"text/x-python","patch_set":42,"id":"9f1415b1_91a0904c","line":165,"in_reply_to":"2958c289_b3fa7175","updated":"2024-09-30 14:42:40.000000000","message":"Acknowledged","commit_id":"29afdafa05525354de9c7d6dcff541904032763e"}],"test/unit/common/utils/test_logs.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7527eeba61016ee6907c090e51c13d747bef2c2e","unresolved":true,"context_lines":[{"line_number":289,"context_line":"        self.assertEqual(\u0027route\u0027, logger1.name)"},{"line_number":290,"context_line":"        self.assertEqual(\u0027route\u0027, logger1.logger.name)"},{"line_number":291,"context_line":"        self.assertEqual(\u0027name1\u0027, logger1.server)"},{"line_number":292,"context_line":"        # oh dear, the statsd client on the common logging.Logger instance got"},{"line_number":293,"context_line":"        # mutated when logger2 was created"},{"line_number":294,"context_line":"        self.assertEqual(\u0027name1.\u0027, logger1.statsd_client._prefix)"},{"line_number":295,"context_line":"        self.assertEqual(\u0027route\u0027, logger2.name)"},{"line_number":296,"context_line":"        self.assertEqual(\u0027route\u0027, logger2.logger.name)"}],"source_content_type":"text/x-python","patch_set":28,"id":"e268c686_f4411fcc","line":293,"range":{"start_line":292,"start_character":8,"end_line":293,"end_character":42},"updated":"2024-08-27 22:53:17.000000000","message":"Hey, we fixed a thing! We should drop the comment.","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"c0f2da970fc99d4518b2f67375e79a85b4eec160","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        self.assertEqual(\u0027route\u0027, logger1.name)"},{"line_number":290,"context_line":"        self.assertEqual(\u0027route\u0027, logger1.logger.name)"},{"line_number":291,"context_line":"        self.assertEqual(\u0027name1\u0027, logger1.server)"},{"line_number":292,"context_line":"        # oh dear, the statsd client on the common logging.Logger instance got"},{"line_number":293,"context_line":"        # mutated when logger2 was created"},{"line_number":294,"context_line":"        self.assertEqual(\u0027name1.\u0027, logger1.statsd_client._prefix)"},{"line_number":295,"context_line":"        self.assertEqual(\u0027route\u0027, logger2.name)"},{"line_number":296,"context_line":"        self.assertEqual(\u0027route\u0027, logger2.logger.name)"}],"source_content_type":"text/x-python","patch_set":28,"id":"ab4c29ac_f76a1280","line":293,"range":{"start_line":292,"start_character":8,"end_line":293,"end_character":42},"in_reply_to":"e268c686_f4411fcc","updated":"2024-08-28 15:54:02.000000000","message":"Acknowledged","commit_id":"f8335566522876c2511c88a9530a8b308ca5c513"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f9a63cc25d0c4acfad10027cff5145a3ffb0378f","unresolved":true,"context_lines":[{"line_number":231,"context_line":"                fmt\u003d\"%(server)s: %(message)s\", max_line_length\u003d20)"},{"line_number":232,"context_line":"            )"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"            logger.logger.logger.addHandler(handler)"},{"line_number":235,"context_line":"            yield sio"},{"line_number":236,"context_line":"            logger.logger.logger.removeHandler(handler)"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"daeb260f_acf6b876","line":234,"updated":"2024-09-11 12:23:10.000000000","message":"this change demonstrates that the new ``get_logger`` returns something different than the old ``get_logger``","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"f39485ce50fd147a787f80b07de87c25e00b4c61","unresolved":true,"context_lines":[{"line_number":231,"context_line":"                fmt\u003d\"%(server)s: %(message)s\", max_line_length\u003d20)"},{"line_number":232,"context_line":"            )"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"            logger.logger.logger.addHandler(handler)"},{"line_number":235,"context_line":"            yield sio"},{"line_number":236,"context_line":"            logger.logger.logger.removeHandler(handler)"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"fd175f14_c447dd02","line":234,"in_reply_to":"daeb260f_acf6b876","updated":"2024-09-11 14:01:02.000000000","message":"https://review.opendev.org/c/openstack/swift/+/915483/33/test/unit/common/utils/test_logs.py#b291:~:text\u003d%23-,oh,-dear%2C%20the\n\nThe statsd_client is no longer mutated, and we get the expected loggers.","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"3abed308b51252b413169f97693b298704c411ea","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                fmt\u003d\"%(server)s: %(message)s\", max_line_length\u003d20)"},{"line_number":232,"context_line":"            )"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"            logger.logger.logger.addHandler(handler)"},{"line_number":235,"context_line":"            yield sio"},{"line_number":236,"context_line":"            logger.logger.logger.removeHandler(handler)"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"9683216c_6a48ba5c","line":234,"in_reply_to":"fd175f14_c447dd02","updated":"2024-09-17 19:09:38.000000000","message":"Done","commit_id":"52a1e1a0be2ababda96c3bd3f95025a21df61dee"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"fca9ec8d6734d516d63f0627028d18f48e85e972","unresolved":true,"context_lines":[{"line_number":742,"context_line":"            self.assertEqual(\u0027some prefix: \u0027, log_msg[:13])"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"        finally:"},{"line_number":745,"context_line":"            base_logger.logger.removeHandler(handler)"},{"line_number":746,"context_line":""},{"line_number":747,"context_line":"    @reset_logger_state"},{"line_number":748,"context_line":"    def test_nested_prefixlogger(self):"}],"source_content_type":"text/x-python","patch_set":45,"id":"296da4a9_97ef4849","side":"PARENT","line":745,"updated":"2024-09-30 18:08:05.000000000","message":"this test might potentially still be useful - just on a regular SwiftLogAdapter as returned from get_swift_logger","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d4599d5a72512155a8c56c5471b43f7105f6fa0b","unresolved":false,"context_lines":[{"line_number":742,"context_line":"            self.assertEqual(\u0027some prefix: \u0027, log_msg[:13])"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"        finally:"},{"line_number":745,"context_line":"            base_logger.logger.removeHandler(handler)"},{"line_number":746,"context_line":""},{"line_number":747,"context_line":"    @reset_logger_state"},{"line_number":748,"context_line":"    def test_nested_prefixlogger(self):"}],"source_content_type":"text/x-python","patch_set":45,"id":"dea6a4f7_d2bcaa41","side":"PARENT","line":745,"in_reply_to":"296da4a9_97ef4849","updated":"2024-10-01 14:16:34.000000000","message":"Acknowledged","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"fca9ec8d6734d516d63f0627028d18f48e85e972","unresolved":true,"context_lines":[{"line_number":772,"context_line":"            self.assertEqual(strip_value(sio), \u0027one: two: test\\n\u0027)"},{"line_number":773,"context_line":"            self.assertEqual(strip_value(sio), \u0027\u0027)"},{"line_number":774,"context_line":"        finally:"},{"line_number":775,"context_line":"            base_logger.logger.removeHandler(handler)"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"    @reset_logger_state"},{"line_number":778,"context_line":"    def test_capture_stdio(self):"}],"source_content_type":"text/x-python","patch_set":45,"id":"56369488_5fac8e16","side":"PARENT","line":775,"updated":"2024-09-30 18:08:05.000000000","message":"we can keep these tests if we s/PrefixLoggerAdapter/SwiftLogAdapter/g","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d4599d5a72512155a8c56c5471b43f7105f6fa0b","unresolved":false,"context_lines":[{"line_number":772,"context_line":"            self.assertEqual(strip_value(sio), \u0027one: two: test\\n\u0027)"},{"line_number":773,"context_line":"            self.assertEqual(strip_value(sio), \u0027\u0027)"},{"line_number":774,"context_line":"        finally:"},{"line_number":775,"context_line":"            base_logger.logger.removeHandler(handler)"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"    @reset_logger_state"},{"line_number":778,"context_line":"    def test_capture_stdio(self):"}],"source_content_type":"text/x-python","patch_set":45,"id":"b6840d37_6b77429e","side":"PARENT","line":775,"in_reply_to":"56369488_5fac8e16","updated":"2024-10-01 14:16:34.000000000","message":"Acknowledged","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"fca9ec8d6734d516d63f0627028d18f48e85e972","unresolved":true,"context_lines":[{"line_number":1047,"context_line":"        except OSError:"},{"line_number":1048,"context_line":"            with mock.patch(\u0027logging.LoggerAdapter.error\u0027) as mocked:"},{"line_number":1049,"context_line":"                adapter.exception(\u0027Caught\u0027)"},{"line_number":1050,"context_line":"        mocked.assert_called_with(\u0027Caught: Connection refused\u0027)"},{"line_number":1051,"context_line":""},{"line_number":1052,"context_line":""},{"line_number":1053,"context_line":"class TestPipeMutex(unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":45,"id":"d4d6e1bf_67943211","side":"PARENT","line":1050,"updated":"2024-09-30 18:08:05.000000000","message":"We can keep these tests if we s/SwiftLoggerAdapter/SwiftLogAdapter/g","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d4599d5a72512155a8c56c5471b43f7105f6fa0b","unresolved":false,"context_lines":[{"line_number":1047,"context_line":"        except OSError:"},{"line_number":1048,"context_line":"            with mock.patch(\u0027logging.LoggerAdapter.error\u0027) as mocked:"},{"line_number":1049,"context_line":"                adapter.exception(\u0027Caught\u0027)"},{"line_number":1050,"context_line":"        mocked.assert_called_with(\u0027Caught: Connection refused\u0027)"},{"line_number":1051,"context_line":""},{"line_number":1052,"context_line":""},{"line_number":1053,"context_line":"class TestPipeMutex(unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":45,"id":"1c87a584_87518220","side":"PARENT","line":1050,"in_reply_to":"d4d6e1bf_67943211","updated":"2024-10-01 14:16:34.000000000","message":"Acknowledged","commit_id":"48e087b1cc7ea564d0f205baf5d625cad34be810"}],"test/unit/obj/test_reconstructor.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"371d43e55eb849a0d0a3934f03357d737953902a","unresolved":true,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def count_stats(logger, key, metric):"},{"line_number":142,"context_line":"    count \u003d 0"},{"line_number":143,"context_line":"    for record in logger.logger.statsd_client.calls[key]:"},{"line_number":144,"context_line":"        stat_args, stat_kwargs \u003d record"},{"line_number":145,"context_line":"        m \u003d stat_args[0]"},{"line_number":146,"context_line":"        if re.match(metric, m):"}],"source_content_type":"text/x-python","patch_set":38,"id":"317fca05_9c4c9f40","line":143,"updated":"2024-09-18 12:36:40.000000000","message":"change shouldn\u0027t be necessary?","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"d79d542ad98863b6fc2ae11559e41dc2e4901eda","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def count_stats(logger, key, metric):"},{"line_number":142,"context_line":"    count \u003d 0"},{"line_number":143,"context_line":"    for record in logger.logger.statsd_client.calls[key]:"},{"line_number":144,"context_line":"        stat_args, stat_kwargs \u003d record"},{"line_number":145,"context_line":"        m \u003d stat_args[0]"},{"line_number":146,"context_line":"        if re.match(metric, m):"}],"source_content_type":"text/x-python","patch_set":38,"id":"7aa4fa06_ecf2caea","line":143,"in_reply_to":"317fca05_9c4c9f40","updated":"2024-09-18 20:57:03.000000000","message":"Agree, en extra logger isn\u0027t needed here.","commit_id":"1aa7decf08cd9b46df50328c7ea084e813f3037e"}]}
