)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"e5cba239f69361cc0aae6b661270e52540d878ff","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow passing logger object to request"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"It can become difficult to trace the client that created http requests"},{"line_number":10,"context_line":"as the logging all goes through the keystoneclient.session logger. Allow"},{"line_number":11,"context_line":"passing the logger through the request function and make it able to be"},{"line_number":12,"context_line":"set via the adapter so it can be set once per client instantiation."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a80dd14_2f987f69","line":9,"updated":"2015-03-06 16:34:49.000000000","message":"(nit) HTTP","commit_id":"d634e67a5d66a55674d1f237008b9e6f7b388326"}],"keystoneclient/session.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c7802c8cb6d9c650ffdd07da574bda8014aeac4b","unresolved":false,"context_lines":[{"line_number":288,"context_line":"                                  response. (optional, default True)"},{"line_number":289,"context_line":"        :param bool log: If True then log the request and response data to the"},{"line_number":290,"context_line":"                         debug log. (optional, default True)"},{"line_number":291,"context_line":"        :param logger: The logger object to use to log request and responses."},{"line_number":292,"context_line":"        :type logger: logging.Logger"},{"line_number":293,"context_line":"        :param kwargs: any other parameter that can be passed to"},{"line_number":294,"context_line":"                       requests.Session.request (such as `headers`). Except:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_3eaa94d4","line":291,"updated":"2015-03-05 23:48:37.000000000","message":"this should say what happens if logger isn\u0027t set.\n\nseems like it would be easier to combine this with the log parameter -- log can be either a boolean or a logger.","commit_id":"d634e67a5d66a55674d1f237008b9e6f7b388326"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"1031ff0000d3704c11c4522ec20669c73918ba5f","unresolved":false,"context_lines":[{"line_number":288,"context_line":"                                  response. (optional, default True)"},{"line_number":289,"context_line":"        :param bool log: If True then log the request and response data to the"},{"line_number":290,"context_line":"                         debug log. (optional, default True)"},{"line_number":291,"context_line":"        :param logger: The logger object to use to log request and responses."},{"line_number":292,"context_line":"        :type logger: logging.Logger"},{"line_number":293,"context_line":"        :param kwargs: any other parameter that can be passed to"},{"line_number":294,"context_line":"                       requests.Session.request (such as `headers`). Except:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_7a392fa3","line":291,"in_reply_to":"9a80dd14_3eaa94d4","updated":"2015-03-08 22:19:36.000000000","message":"Maybe log was badly named then. \n\nlog only affects printing the request and response output. If you have a 401 or other failure then it would still be printed on the logger. If i use log as the logger then I wouldn\u0027t get things like a 401 from an auth failed (and auth requests are the primary reason for disabling logging).","commit_id":"d634e67a5d66a55674d1f237008b9e6f7b388326"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"d0d2e37d2fa4331ba778384631b9134491888793","unresolved":false,"context_lines":[{"line_number":288,"context_line":"                                  response. (optional, default True)"},{"line_number":289,"context_line":"        :param bool log: If True then log the request and response data to the"},{"line_number":290,"context_line":"                         debug log. (optional, default True)"},{"line_number":291,"context_line":"        :param logger: The logger object to use to log request and responses."},{"line_number":292,"context_line":"        :type logger: logging.Logger"},{"line_number":293,"context_line":"        :param kwargs: any other parameter that can be passed to"},{"line_number":294,"context_line":"                       requests.Session.request (such as `headers`). Except:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_9ada634a","line":291,"in_reply_to":"9a80dd14_7a392fa3","updated":"2015-03-08 22:35:10.000000000","message":"I was only looking at how it was used in a couple of places... combining them is a bad idea.\n\nStill, docs should say what happens if logger isn\u0027t passed in.","commit_id":"d634e67a5d66a55674d1f237008b9e6f7b388326"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"df284a65db11b5353f2f823f1aea5e49b1801ee7","unresolved":false,"context_lines":[{"line_number":288,"context_line":"                                  response. (optional, default True)"},{"line_number":289,"context_line":"        :param bool log: If True then log the request and response data to the"},{"line_number":290,"context_line":"                         debug log. (optional, default True)"},{"line_number":291,"context_line":"        :param logger: The logger object to use to log request and responses."},{"line_number":292,"context_line":"        :type logger: logging.Logger"},{"line_number":293,"context_line":"        :param kwargs: any other parameter that can be passed to"},{"line_number":294,"context_line":"                       requests.Session.request (such as `headers`). Except:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_5b51a72e","line":291,"in_reply_to":"9a80dd14_9ada634a","updated":"2015-03-16 04:17:27.000000000","message":"Done","commit_id":"d634e67a5d66a55674d1f237008b9e6f7b388326"}],"keystoneclient/tests/unit/test_session.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"e5cba239f69361cc0aae6b661270e52540d878ff","unresolved":false,"context_lines":[{"line_number":627,"context_line":""},{"line_number":628,"context_line":"        resp \u003d sess.get(self.TEST_URL, logger\u003dlogger)"},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        self.assertEqual(response, resp.text)"},{"line_number":631,"context_line":"        output \u003d io.getvalue()"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"        self.assertIn(self.TEST_URL, output)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_b274d436","line":630,"updated":"2015-03-06 16:34:49.000000000","message":"I wouldn\u0027t hold anything up because of this, but why keep this? It seems that since the focus of the test is logging that this can be left out.","commit_id":"d634e67a5d66a55674d1f237008b9e6f7b388326"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"e5cba239f69361cc0aae6b661270e52540d878ff","unresolved":false,"context_lines":[{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        self.assertNotIn(self.TEST_URL, self.logger.output)"},{"line_number":637,"context_line":"        self.assertNotIn(response, self.logger.output)"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"class AdapterTest(utils.TestCase):"},{"line_number":641,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_b21e94b9","line":638,"updated":"2015-03-06 16:34:49.000000000","message":"Shouldn\u0027t you be checking for the name of the logger too? Isn\u0027t that the point of this change to have \u0027Xclient\u0027 as the module name?","commit_id":"d634e67a5d66a55674d1f237008b9e6f7b388326"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"df284a65db11b5353f2f823f1aea5e49b1801ee7","unresolved":false,"context_lines":[{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        self.assertNotIn(self.TEST_URL, self.logger.output)"},{"line_number":637,"context_line":"        self.assertNotIn(response, self.logger.output)"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"class AdapterTest(utils.TestCase):"},{"line_number":641,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_1e10fd4c","line":638,"in_reply_to":"9a80dd14_b21e94b9","updated":"2015-03-16 04:17:27.000000000","message":"I *think* this is a formatter thing? it\u0027s not in the output that is provided by the StreamHandler at least. I could write a formatter but i don\u0027t see that it tells me any more than the request was in the passed in logger and not the default one.","commit_id":"d634e67a5d66a55674d1f237008b9e6f7b388326"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c7802c8cb6d9c650ffdd07da574bda8014aeac4b","unresolved":false,"context_lines":[{"line_number":800,"context_line":"        self.assertEqual(auth.TEST_PROJECT_ID, adpt.get_project_id())"},{"line_number":801,"context_line":""},{"line_number":802,"context_line":"    def test_logger_object_passed(self):"},{"line_number":803,"context_line":"        logger \u003d logging.getLogger(uuid.uuid4().hex)"},{"line_number":804,"context_line":"        logger.setLevel(logging.DEBUG)"},{"line_number":805,"context_line":"        logger.propagate \u003d False"},{"line_number":806,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_7ef5ecc9","line":803,"updated":"2015-03-05 23:48:37.000000000","message":"looks like fixtures provides a FakeLogger for this -- https://github.com/testing-cabal/fixtures/blob/master/fixtures/_fixtures/logger.py#L65","commit_id":"d634e67a5d66a55674d1f237008b9e6f7b388326"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"df284a65db11b5353f2f823f1aea5e49b1801ee7","unresolved":false,"context_lines":[{"line_number":800,"context_line":"        self.assertEqual(auth.TEST_PROJECT_ID, adpt.get_project_id())"},{"line_number":801,"context_line":""},{"line_number":802,"context_line":"    def test_logger_object_passed(self):"},{"line_number":803,"context_line":"        logger \u003d logging.getLogger(uuid.uuid4().hex)"},{"line_number":804,"context_line":"        logger.setLevel(logging.DEBUG)"},{"line_number":805,"context_line":"        logger.propagate \u003d False"},{"line_number":806,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_9e878d60","line":803,"in_reply_to":"9a80dd14_7ef5ecc9","updated":"2015-03-16 04:17:27.000000000","message":"The fixtures there seem to be more about passing intercepting logging messages made to an existing name. \n\nNeither of those objects actually provide me with a logging.Logger object that i could use to pass here, just the output stream of anything intercepted.\n\nSo i could \n\nself.useFixture(fixtures.FakeLogger(name\u003dname))\nlogger \u003d self.getLogger(name)\n\nbut i don\u0027t think that is more obvious.","commit_id":"d634e67a5d66a55674d1f237008b9e6f7b388326"}]}
