prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Turn the option system.logging-format into an enum.
  
  
  </issue>
  <code>
  [start of src/sentry/logging/__init__.py]
  1 """
  2 sentry.logging
  3 ~~~~~~~~~~~~~~
  4 :copyright: (c) 2010-2016 by the Sentry Team, see AUTHORS for more details.
  5 :license: BSD, see LICENSE for more details.
  6 """
  7 
  8 from __future__ import absolute_import
  9
  [end of src/sentry/logging/__init__.py]
  [start of src/sentry/options/defaults.py]
  1 """
  2 sentry.options.defaults
  3 ~~~~~~~~~~~~~~~~~~~~~~~
  4 
  5 :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
  6 :license: BSD, see LICENSE for more details.
  7 """
  8 from __future__ import absolute_import, print_function
  9 
  10 from sentry.options import (
  11     FLAG_IMMUTABLE, FLAG_NOSTORE, FLAG_PRIORITIZE_DISK, FLAG_REQUIRED, FLAG_ALLOW_EMPTY,
  12     register,
  13 )
  14 from sentry.utils.types import Dict, String
  15 
  16 # Cache
  17 # register('cache.backend', flags=FLAG_NOSTORE)
  18 # register('cache.options', type=Dict, flags=FLAG_NOSTORE)
  19 
  20 # System
  21 register('system.admin-email', flags=FLAG_REQUIRED)
  22 register('system.databases', type=Dict, flags=FLAG_NOSTORE)
  23 # register('system.debug', default=False, flags=FLAG_NOSTORE)
  24 register('system.rate-limit', default=0, flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)
  25 register('system.secret-key', flags=FLAG_NOSTORE)
  26 # Absolute URL to the sentry root directory. Should not include a trailing slash.
  27 register('system.url-prefix', ttl=60, grace=3600, flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK)
  28 register('system.root-api-key', flags=FLAG_PRIORITIZE_DISK)
  29 register('system.logging-format', default='human', flags=FLAG_PRIORITIZE_DISK)
  30 
  31 # Redis
  32 register(
  33     'redis.clusters',
  34     type=Dict,
  35     default={
  36         'default': {
  37             'hosts': {
  38                 0: {
  39                     'host': '127.0.0.1',
  40                     'port': 6379,
  41                 }
  42             },
  43         },
  44     },
  45     flags=FLAG_NOSTORE | FLAG_IMMUTABLE
  46 )
  47 register('redis.options', type=Dict, flags=FLAG_NOSTORE)
  48 
  49 # symbolizer specifics
  50 register('dsym.llvm-symbolizer-path', type=String)
  51 register('dsym.cache-path', type=String, default='/tmp/sentry-dsym-cache')
  52 
  53 # Mail
  54 register('mail.backend', default='smtp', flags=FLAG_NOSTORE)
  55 register('mail.host', default='localhost', flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK)
  56 register('mail.port', default=25, flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK)
  57 register('mail.username', flags=FLAG_REQUIRED | FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)
  58 register('mail.password', flags=FLAG_REQUIRED | FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)
  59 register('mail.use-tls', default=False, flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK)
  60 register('mail.subject-prefix', default='[Sentry] ', flags=FLAG_PRIORITIZE_DISK)
  61 register('mail.from', default='root@localhost', flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK)
  62 register('mail.list-namespace', type=String, default='localhost', flags=FLAG_NOSTORE)
  63 register('mail.enable-replies', default=False, flags=FLAG_PRIORITIZE_DISK)
  64 register('mail.reply-hostname', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)
  65 register('mail.mailgun-api-key', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)
  66 
  67 # SMS
  68 register('sms.twilio-account', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)
  69 register('sms.twilio-token', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)
  70 register('sms.twilio-number', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)
  71
  [end of src/sentry/options/defaults.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/src/sentry/logging/__init__.py b/src/sentry/logging/__init__.py
  --- a/src/sentry/logging/__init__.py
  +++ b/src/sentry/logging/__init__.py
  @@ -6,3 +6,8 @@
   """
   
   from __future__ import absolute_import
  +
  +
  +class LoggingFormat(object):
  +    HUMAN = 'human'
  +    MACHINE = 'machine'
  diff --git a/src/sentry/options/defaults.py b/src/sentry/options/defaults.py
  --- a/src/sentry/options/defaults.py
  +++ b/src/sentry/options/defaults.py
  @@ -7,6 +7,7 @@
   """
   from __future__ import absolute_import, print_function
   
  +from sentry.logging import LoggingFormat
   from sentry.options import (
       FLAG_IMMUTABLE, FLAG_NOSTORE, FLAG_PRIORITIZE_DISK, FLAG_REQUIRED, FLAG_ALLOW_EMPTY,
       register,
  @@ -26,7 +27,7 @@
   # Absolute URL to the sentry root directory. Should not include a trailing slash.
   register('system.url-prefix', ttl=60, grace=3600, flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK)
   register('system.root-api-key', flags=FLAG_PRIORITIZE_DISK)
  -register('system.logging-format', default='human', flags=FLAG_PRIORITIZE_DISK)
  +register('system.logging-format', default=LoggingFormat.HUMAN, flags=FLAG_PRIORITIZE_DISK)
   
   # Redis
   register(
  
verification_info: {"golden_diff": "diff --git a/src/sentry/logging/__init__.py b/src/sentry/logging/__init__.py\n--- a/src/sentry/logging/__init__.py\n+++ b/src/sentry/logging/__init__.py\n@@ -6,3 +6,8 @@\n \"\"\"\n \n from __future__ import absolute_import\n+\n+\n+class LoggingFormat(object):\n+    HUMAN = 'human'\n+    MACHINE = 'machine'\ndiff --git a/src/sentry/options/defaults.py b/src/sentry/options/defaults.py\n--- a/src/sentry/options/defaults.py\n+++ b/src/sentry/options/defaults.py\n@@ -7,6 +7,7 @@\n \"\"\"\n from __future__ import absolute_import, print_function\n \n+from sentry.logging import LoggingFormat\n from sentry.options import (\n     FLAG_IMMUTABLE, FLAG_NOSTORE, FLAG_PRIORITIZE_DISK, FLAG_REQUIRED, FLAG_ALLOW_EMPTY,\n     register,\n@@ -26,7 +27,7 @@\n # Absolute URL to the sentry root directory. Should not include a trailing slash.\n register('system.url-prefix', ttl=60, grace=3600, flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK)\n register('system.root-api-key', flags=FLAG_PRIORITIZE_DISK)\n-register('system.logging-format', default='human', flags=FLAG_PRIORITIZE_DISK)\n+register('system.logging-format', default=LoggingFormat.HUMAN, flags=FLAG_PRIORITIZE_DISK)\n \n # Redis\n register(\n", "issue": "Turn the option system.logging-format into an enum.\n\n", "before_files": [{"content": "\"\"\"\nsentry.logging\n~~~~~~~~~~~~~~\n:copyright: (c) 2010-2016 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n\nfrom __future__ import absolute_import\n", "path": "src/sentry/logging/__init__.py"}, {"content": "\"\"\"\nsentry.options.defaults\n~~~~~~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\nfrom __future__ import absolute_import, print_function\n\nfrom sentry.options import (\n    FLAG_IMMUTABLE, FLAG_NOSTORE, FLAG_PRIORITIZE_DISK, FLAG_REQUIRED, FLAG_ALLOW_EMPTY,\n    register,\n)\nfrom sentry.utils.types import Dict, String\n\n# Cache\n# register('cache.backend', flags=FLAG_NOSTORE)\n# register('cache.options', type=Dict, flags=FLAG_NOSTORE)\n\n# System\nregister('system.admin-email', flags=FLAG_REQUIRED)\nregister('system.databases', type=Dict, flags=FLAG_NOSTORE)\n# register('system.debug', default=False, flags=FLAG_NOSTORE)\nregister('system.rate-limit', default=0, flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)\nregister('system.secret-key', flags=FLAG_NOSTORE)\n# Absolute URL to the sentry root directory. Should not include a trailing slash.\nregister('system.url-prefix', ttl=60, grace=3600, flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK)\nregister('system.root-api-key', flags=FLAG_PRIORITIZE_DISK)\nregister('system.logging-format', default='human', flags=FLAG_PRIORITIZE_DISK)\n\n# Redis\nregister(\n    'redis.clusters',\n    type=Dict,\n    default={\n        'default': {\n            'hosts': {\n                0: {\n                    'host': '127.0.0.1',\n                    'port': 6379,\n                }\n            },\n        },\n    },\n    flags=FLAG_NOSTORE | FLAG_IMMUTABLE\n)\nregister('redis.options', type=Dict, flags=FLAG_NOSTORE)\n\n# symbolizer specifics\nregister('dsym.llvm-symbolizer-path', type=String)\nregister('dsym.cache-path', type=String, default='/tmp/sentry-dsym-cache')\n\n# Mail\nregister('mail.backend', default='smtp', flags=FLAG_NOSTORE)\nregister('mail.host', default='localhost', flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK)\nregister('mail.port', default=25, flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK)\nregister('mail.username', flags=FLAG_REQUIRED | FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)\nregister('mail.password', flags=FLAG_REQUIRED | FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)\nregister('mail.use-tls', default=False, flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK)\nregister('mail.subject-prefix', default='[Sentry] ', flags=FLAG_PRIORITIZE_DISK)\nregister('mail.from', default='root@localhost', flags=FLAG_REQUIRED | FLAG_PRIORITIZE_DISK)\nregister('mail.list-namespace', type=String, default='localhost', flags=FLAG_NOSTORE)\nregister('mail.enable-replies', default=False, flags=FLAG_PRIORITIZE_DISK)\nregister('mail.reply-hostname', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)\nregister('mail.mailgun-api-key', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)\n\n# SMS\nregister('sms.twilio-account', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)\nregister('sms.twilio-token', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)\nregister('sms.twilio-number', default='', flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK)\n", "path": "src/sentry/options/defaults.py"}]}