)]}'
{"zaqar/cmd/server.py":[{"author":{"_account_id":10634,"name":"Peng Fei Wang","email":"wpf710@gmail.com","username":"wpf"},"change_message_id":"45ce6ed02b5c4e32ac9454468084f39652ac2843","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    conf \u003d cfg.CONF"},{"line_number":29,"context_line":"    # NOTE(jeffrey4l): Overwrite the default vaule for"},{"line_number":30,"context_line":"    # logging_context_format_string. Add project_id into it."},{"line_number":31,"context_line":"    conf.set_default(\u0027logging_context_format_string\u0027,"},{"line_number":32,"context_line":"                     \u0027%(asctime)s.%(msecs)03d %(process)d %(levelname)s\u0027"},{"line_number":33,"context_line":"                     \u0027 %(name)s [%(request_id)s %(user_identity)s]\u0027"},{"line_number":34,"context_line":"                     \u0027 [project_id:%(project_id)s] %(message)s\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_be7d92e9","line":31,"updated":"2014-10-23 01:08:06.000000000","message":"Q: why we hardcode the value here?  we can set it in the zaqar.conf file I thought","commit_id":"a7bd076d32a7f674c6e74263ce80d7ba8a34ce18"},{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"4d5ff21c3e0d7359d7a4cd9850687f06ae66fecc","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    conf \u003d cfg.CONF"},{"line_number":29,"context_line":"    # NOTE(jeffrey4l): Overwrite the default vaule for"},{"line_number":30,"context_line":"    # logging_context_format_string. Add project_id into it."},{"line_number":31,"context_line":"    conf.set_default(\u0027logging_context_format_string\u0027,"},{"line_number":32,"context_line":"                     \u0027%(asctime)s.%(msecs)03d %(process)d %(levelname)s\u0027"},{"line_number":33,"context_line":"                     \u0027 %(name)s [%(request_id)s %(user_identity)s]\u0027"},{"line_number":34,"context_line":"                     \u0027 [project_id:%(project_id)s] %(message)s\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_b4785390","line":31,"in_reply_to":"9aa7fdbe_21034743","updated":"2014-10-23 02:02:02.000000000","message":"I agree with you. This little hack is not very well.\n\nChange the zaqar/openstack/common/log.py maybe better. But this file is copy from oslo-incubator[1]. Is it OK to change the content of that file? I have no idea about this.\n\n[1] https://github.com/openstack/oslo-incubator","commit_id":"a7bd076d32a7f674c6e74263ce80d7ba8a34ce18"},{"author":{"_account_id":10634,"name":"Peng Fei Wang","email":"wpf710@gmail.com","username":"wpf"},"change_message_id":"48cab31e641c6ac9dbe37c9966ed05bc7a103880","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    conf \u003d cfg.CONF"},{"line_number":29,"context_line":"    # NOTE(jeffrey4l): Overwrite the default vaule for"},{"line_number":30,"context_line":"    # logging_context_format_string. Add project_id into it."},{"line_number":31,"context_line":"    conf.set_default(\u0027logging_context_format_string\u0027,"},{"line_number":32,"context_line":"                     \u0027%(asctime)s.%(msecs)03d %(process)d %(levelname)s\u0027"},{"line_number":33,"context_line":"                     \u0027 %(name)s [%(request_id)s %(user_identity)s]\u0027"},{"line_number":34,"context_line":"                     \u0027 [project_id:%(project_id)s] %(message)s\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_21034743","line":31,"in_reply_to":"9aa7fdbe_61562fd4","updated":"2014-10-23 01:55:31.000000000","message":"then why can\u0027t we uncomment the \u0027logging_context_format_string\u0027 in zaqar.conf.  ( I believe in the production env, there will be zaqar.conf)\n\ncan we also change the default value in zaqar/openstack/common/log.py? \n\nin your way, it\u0027s hidden from the end-user\u0027s perspective and they don\u0027t know how the log was generated.","commit_id":"a7bd076d32a7f674c6e74263ce80d7ba8a34ce18"},{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"826dda6df8394a1b9a4029254c11da024403b128","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    conf \u003d cfg.CONF"},{"line_number":29,"context_line":"    # NOTE(jeffrey4l): Overwrite the default vaule for"},{"line_number":30,"context_line":"    # logging_context_format_string. Add project_id into it."},{"line_number":31,"context_line":"    conf.set_default(\u0027logging_context_format_string\u0027,"},{"line_number":32,"context_line":"                     \u0027%(asctime)s.%(msecs)03d %(process)d %(levelname)s\u0027"},{"line_number":33,"context_line":"                     \u0027 %(name)s [%(request_id)s %(user_identity)s]\u0027"},{"line_number":34,"context_line":"                     \u0027 [project_id:%(project_id)s] %(message)s\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_61562fd4","line":31,"in_reply_to":"9aa7fdbe_be7d92e9","updated":"2014-10-23 01:19:13.000000000","message":"I just make the logging_context_format_string is suitable for zaqar in default way.\n\nIf not, the uuid of instance(This is hardcode in zaqar/openstack/common/log.py) will be logged rather than the project id. This is useless. \n\nConfiguring the zaqar.conf file will be work either. But the items in the zaqar.conf is commented in default. So the project id is not logged in the default way. That is way I want to avoid.\n\nSo I re-set the default value for the `logging_context_format_string`","commit_id":"a7bd076d32a7f674c6e74263ce80d7ba8a34ce18"}],"zaqar/common/transport/wsgi/helpers.py":[{"author":{"_account_id":10634,"name":"Peng Fei Wang","email":"wpf710@gmail.com","username":"wpf"},"change_message_id":"45ce6ed02b5c4e32ac9454468084f39652ac2843","unresolved":false,"context_lines":[{"line_number":158,"context_line":"def inject_context(req, resp, params):"},{"line_number":159,"context_line":"    \"\"\"Inject context value into request environment."},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    It also store the context info a threading local variable."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    :param req: request sent"},{"line_number":164,"context_line":"    :type req: falcon.request.Request"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_c12a7b7d","line":161,"updated":"2014-10-23 01:08:06.000000000","message":"Q: where the magic?","commit_id":"a7bd076d32a7f674c6e74263ce80d7ba8a34ce18"},{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"4d5ff21c3e0d7359d7a4cd9850687f06ae66fecc","unresolved":false,"context_lines":[{"line_number":158,"context_line":"def inject_context(req, resp, params):"},{"line_number":159,"context_line":"    \"\"\"Inject context value into request environment."},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    It also store the context info a threading local variable."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    :param req: request sent"},{"line_number":164,"context_line":"    :type req: falcon.request.Request"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_d46f97c3","line":161,"in_reply_to":"9aa7fdbe_0149e38a","updated":"2014-10-23 02:02:02.000000000","message":"Done","commit_id":"a7bd076d32a7f674c6e74263ce80d7ba8a34ce18"},{"author":{"_account_id":10634,"name":"Peng Fei Wang","email":"wpf710@gmail.com","username":"wpf"},"change_message_id":"48cab31e641c6ac9dbe37c9966ed05bc7a103880","unresolved":false,"context_lines":[{"line_number":158,"context_line":"def inject_context(req, resp, params):"},{"line_number":159,"context_line":"    \"\"\"Inject context value into request environment."},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    It also store the context info a threading local variable."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    :param req: request sent"},{"line_number":164,"context_line":"    :type req: falcon.request.Request"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_0149e38a","line":161,"in_reply_to":"9aa7fdbe_41abebd5","updated":"2014-10-23 01:55:31.000000000","message":"agree , -:)","commit_id":"a7bd076d32a7f674c6e74263ce80d7ba8a34ce18"},{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"826dda6df8394a1b9a4029254c11da024403b128","unresolved":false,"context_lines":[{"line_number":158,"context_line":"def inject_context(req, resp, params):"},{"line_number":159,"context_line":"    \"\"\"Inject context value into request environment."},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    It also store the context info a threading local variable."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    :param req: request sent"},{"line_number":164,"context_line":"    :type req: falcon.request.Request"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_41abebd5","line":161,"in_reply_to":"9aa7fdbe_c12a7b7d","updated":"2014-10-23 01:19:13.000000000","message":"It is in the RequestContext class. Maybe I should not mention this?","commit_id":"a7bd076d32a7f674c6e74263ce80d7ba8a34ce18"},{"author":{"_account_id":10634,"name":"Peng Fei Wang","email":"wpf710@gmail.com","username":"wpf"},"change_message_id":"45ce6ed02b5c4e32ac9454468084f39652ac2843","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    ctxt \u003d context.RequestContext(project_id\u003dproject_id,"},{"line_number":176,"context_line":"                                  client_id\u003dclient_id)"},{"line_number":177,"context_line":"    req.env[\u0027zaqar.context\u0027] \u003d ctxt"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_015c8324","line":177,"updated":"2014-10-23 01:08:06.000000000","message":"Q: in the zaqar code ,seems that we did not use this variable \u0027zaqar.context\u0027","commit_id":"a7bd076d32a7f674c6e74263ce80d7ba8a34ce18"},{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"826dda6df8394a1b9a4029254c11da024403b128","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    ctxt \u003d context.RequestContext(project_id\u003dproject_id,"},{"line_number":176,"context_line":"                                  client_id\u003dclient_id)"},{"line_number":177,"context_line":"    req.env[\u0027zaqar.context\u0027] \u003d ctxt"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_e17dbf6f","line":177,"in_reply_to":"9aa7fdbe_015c8324","updated":"2014-10-23 01:19:13.000000000","message":"Yes. That\u0027s correct. I just set this value just for future usage. Maybe we need the context variable in certain Resource class. Then, we can get it from the req.env.","commit_id":"a7bd076d32a7f674c6e74263ce80d7ba8a34ce18"},{"author":{"_account_id":10634,"name":"Peng Fei Wang","email":"wpf710@gmail.com","username":"wpf"},"change_message_id":"48cab31e641c6ac9dbe37c9966ed05bc7a103880","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    ctxt \u003d context.RequestContext(project_id\u003dproject_id,"},{"line_number":176,"context_line":"                                  client_id\u003dclient_id)"},{"line_number":177,"context_line":"    req.env[\u0027zaqar.context\u0027] \u003d ctxt"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_6159cf59","line":177,"in_reply_to":"9aa7fdbe_e17dbf6f","updated":"2014-10-23 01:55:31.000000000","message":"Ok","commit_id":"a7bd076d32a7f674c6e74263ce80d7ba8a34ce18"}]}
