prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Checkov logs to stdout making the json un-parseable
  **Describe the bug**
  When you run checkov with the `-o json` and `LOG_LEVEL=WARNING` the logs are printed to `stdout` together with the json object. This way it's hard and error prone to parse the json output.
  
  **Expected behavior**
  At least in `-o json` (or any parseable output) mode It should use stderr to log to and use stdout only for the parseable  output and log everything else to stderr.
  
  
  </issue>
  <code>
  [start of checkov/logging_init.py]
  1 import sys
  2 
  3 import logging
  4 import os
  5 
  6 
  7 def init():
  8     LOG_LEVEL = os.environ.get('LOG_LEVEL', 'WARNING').upper()
  9     logging.basicConfig(level=LOG_LEVEL)
  10     logFormatter = logging.Formatter("%(asctime)s [%(threadName)-12.12s] [%(levelname)-5.5s]  %(message)s")
  11     rootLogger = logging.getLogger()
  12     consoleHandler = logging.StreamHandler(sys.stdout)
  13     consoleHandler.setFormatter(logFormatter)
  14     consoleHandler.setLevel(LOG_LEVEL)
  15     rootLogger.addHandler(consoleHandler)
  16     logging.getLogger("urllib3").setLevel(logging.ERROR)
  17     logging.getLogger("urllib3.connectionpool").setLevel(logging.ERROR)
  18     logging.getLogger("urllib3.connectionpool").propagate = False
  19     logging.getLogger("urllib3").propagate = False
  20
  [end of checkov/logging_init.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/checkov/logging_init.py b/checkov/logging_init.py
  --- a/checkov/logging_init.py
  +++ b/checkov/logging_init.py
  @@ -9,7 +9,7 @@
       logging.basicConfig(level=LOG_LEVEL)
       logFormatter = logging.Formatter("%(asctime)s [%(threadName)-12.12s] [%(levelname)-5.5s]  %(message)s")
       rootLogger = logging.getLogger()
  -    consoleHandler = logging.StreamHandler(sys.stdout)
  +    consoleHandler = logging.StreamHandler(sys.stderr)
       consoleHandler.setFormatter(logFormatter)
       consoleHandler.setLevel(LOG_LEVEL)
       rootLogger.addHandler(consoleHandler)
  
verification_info: {"golden_diff": "diff --git a/checkov/logging_init.py b/checkov/logging_init.py\n--- a/checkov/logging_init.py\n+++ b/checkov/logging_init.py\n@@ -9,7 +9,7 @@\n     logging.basicConfig(level=LOG_LEVEL)\n     logFormatter = logging.Formatter(\"%(asctime)s [%(threadName)-12.12s] [%(levelname)-5.5s]  %(message)s\")\n     rootLogger = logging.getLogger()\n-    consoleHandler = logging.StreamHandler(sys.stdout)\n+    consoleHandler = logging.StreamHandler(sys.stderr)\n     consoleHandler.setFormatter(logFormatter)\n     consoleHandler.setLevel(LOG_LEVEL)\n     rootLogger.addHandler(consoleHandler)\n", "issue": "Checkov logs to stdout making the json un-parseable\n**Describe the bug**\r\nWhen you run checkov with the `-o json` and `LOG_LEVEL=WARNING` the logs are printed to `stdout` together with the json object. This way it's hard and error prone to parse the json output.\r\n\r\n**Expected behavior**\r\nAt least in `-o json` (or any parseable output) mode It should use stderr to log to and use stdout only for the parseable  output and log everything else to stderr.\r\n\n", "before_files": [{"content": "import sys\n\nimport logging\nimport os\n\n\ndef init():\n    LOG_LEVEL = os.environ.get('LOG_LEVEL', 'WARNING').upper()\n    logging.basicConfig(level=LOG_LEVEL)\n    logFormatter = logging.Formatter(\"%(asctime)s [%(threadName)-12.12s] [%(levelname)-5.5s]  %(message)s\")\n    rootLogger = logging.getLogger()\n    consoleHandler = logging.StreamHandler(sys.stdout)\n    consoleHandler.setFormatter(logFormatter)\n    consoleHandler.setLevel(LOG_LEVEL)\n    rootLogger.addHandler(consoleHandler)\n    logging.getLogger(\"urllib3\").setLevel(logging.ERROR)\n    logging.getLogger(\"urllib3.connectionpool\").setLevel(logging.ERROR)\n    logging.getLogger(\"urllib3.connectionpool\").propagate = False\n    logging.getLogger(\"urllib3\").propagate = False\n", "path": "checkov/logging_init.py"}]}