)]}'
{"oslo_log/handlers.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"74f7cb054dfa14714822cbe1cda3849f75968bd3","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        the \u0027facility\u0027 argument is an integer as defined in \u0027syslog\u0027"},{"line_number":62,"context_line":"        module\u0027s LOG_* constants. However these constants are different"},{"line_number":63,"context_line":"        from ones defined in Python\u0027s native logging.handlers.SysLogHandler"},{"line_number":64,"context_line":"        class as they are already multiplied by 8."},{"line_number":65,"context_line":"        Thus in order to configure OSSysLogHandler via a separate logging"},{"line_number":66,"context_line":"        configuration file (``log-config-append`` option), the following"},{"line_number":67,"context_line":"        format should be used:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_23f82647","line":64,"updated":"2018-08-13 15:33:25.000000000","message":"Where are the values \"already multiplied by 8\"? Are you saying that the enums in the syslog module are 8 * the values of similar enums from the logging module?","commit_id":"0a560ec5e9351a40e18ad0bb9bb33ed60aad155c"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"2c46d7ae7f89f35dcb61768c91a3fd1d0a1ac2f5","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        the \u0027facility\u0027 argument is an integer as defined in \u0027syslog\u0027"},{"line_number":62,"context_line":"        module\u0027s LOG_* constants. However these constants are different"},{"line_number":63,"context_line":"        from ones defined in Python\u0027s native logging.handlers.SysLogHandler"},{"line_number":64,"context_line":"        class as they are already multiplied by 8."},{"line_number":65,"context_line":"        Thus in order to configure OSSysLogHandler via a separate logging"},{"line_number":66,"context_line":"        configuration file (``log-config-append`` option), the following"},{"line_number":67,"context_line":"        format should be used:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_8b7f9a14","line":64,"in_reply_to":"3f79a3b5_23f82647","updated":"2018-10-29 13:32:48.000000000","message":"rather the other way around\n\nhttps://github.com/python/cpython/blob/2aaf0c12041bcaadd7f2cc5a54450eefd7a6ff12/Lib/logging/handlers.py#L883\n\nsyslohhandler in logging multiplies \u0027facility\u0027 by 8","commit_id":"0a560ec5e9351a40e18ad0bb9bb33ed60aad155c"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"ecfcf2cc9a6dcba5065d9449db40f202d6c404af","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"            [handler_ossyslog]"},{"line_number":70,"context_line":"            class \u003d oslo_log.handlers.OSSysLogHandler"},{"line_number":71,"context_line":"            args \u003d (8 * handlers.SysLogHandler.LOG_USER, )"},{"line_number":72,"context_line":"    \"\"\""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def __init__(self, facility\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_1c22a7a4","line":71,"updated":"2018-07-12 17:12:25.000000000","message":"Why don\u0027t we add a set of constants with the right values to our handler so we can tell users to use those instead of telling them to set up configuration files to do math?","commit_id":"0a560ec5e9351a40e18ad0bb9bb33ed60aad155c"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"74f7cb054dfa14714822cbe1cda3849f75968bd3","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"            [handler_ossyslog]"},{"line_number":70,"context_line":"            class \u003d oslo_log.handlers.OSSysLogHandler"},{"line_number":71,"context_line":"            args \u003d (8 * handlers.SysLogHandler.LOG_USER, )"},{"line_number":72,"context_line":"    \"\"\""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def __init__(self, facility\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_a3a19648","line":71,"in_reply_to":"5f7c97a3_10460b7d","updated":"2018-08-13 15:33:25.000000000","message":"It still feels a bit icky to have to tell users to do this. Should our OSSysLogHandler do the conversion for the user? Does the one in the standard library do the conversion?","commit_id":"0a560ec5e9351a40e18ad0bb9bb33ed60aad155c"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"c4961c1c8da5ce7da323fe65b02b03c6782bc159","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"            [handler_ossyslog]"},{"line_number":70,"context_line":"            class \u003d oslo_log.handlers.OSSysLogHandler"},{"line_number":71,"context_line":"            args \u003d (8 * handlers.SysLogHandler.LOG_USER, )"},{"line_number":72,"context_line":"    \"\"\""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def __init__(self, facility\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_10460b7d","line":71,"in_reply_to":"5f7c97a3_1c22a7a4","updated":"2018-07-12 19:09:23.000000000","message":"I\u0027m pretty sure it won\u0027t work, exactly for the reason how logging.config works. It reads smth like this [0]:\n\n  import logging\n  ...\n  args \u003d eval(args, vars(logging))\n\nUntil we could sneak our constants (or at least \u0027syslog\u0027 ones) into the Python logging module, they won\u0027t be seen / can\u0027t be eval\u0027ed by logging config loader.\nThis, or use completely \u0027magic\u0027 integers (like 136 for LOG_LOCAL1) as args in the config.\nOr write our custom logging config loader implementation.\n\n\n[0] https://github.com/python/cpython/blob/d6345def68d3a0227253da26213dadb247f786db/Lib/logging/config.py#L142","commit_id":"0a560ec5e9351a40e18ad0bb9bb33ed60aad155c"}]}
