prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
   [BUG-General] Terminal output not formatted and uses ASCII in windows
  **Describe the bug**
  I am on Windows and command prompt and I `cd` into example_scenes directory and run 
  ```sh
  manim basic.py
  ``` 
  and I get a output like below.
  ![teminal-format](https://media.discordapp.net/attachments/581738732646957057/766319441209327728/unknown.png)
  I should get in green colour though.
  
  **To Reproduce**
  Just running the one in example_scene in enough.
  
  **Expected behavior**
  The ill formatted thing should be in green colour.
  
  **Logs**
  <details><summary>Terminal output (Screenshots acceptable)</summary>
  
  ![teminal-format](https://media.discordapp.net/attachments/581738732646957057/766319441209327728/unknown.png)
  
  <!-- Paste screenshot here -->
  
  </details>
  
  **System Specifications**
  
  <details><summary>System Details</summary>
  
  - OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)): Windows 7
  - Python version (`python/py/python3 --version`): 3.8
  
  
  </issue>
  <code>
  [start of manim/config/logger.py]
  1 """
  2 logger.py
  3 ---------
  4 This is the logging library for manim.
  5 This library uses rich for coloured log outputs.
  6 
  7 """
  8 
  9 
  10 __all__ = ["logger", "console"]
  11 
  12 
  13 import configparser
  14 import logging
  15 
  16 from rich.console import Console
  17 from rich.logging import RichHandler
  18 from rich.theme import Theme
  19 from rich import print as printf
  20 from rich import errors, color
  21 import json
  22 import copy
  23 
  24 
  25 class JSONFormatter(logging.Formatter):
  26     """Subclass of `:class:`logging.Formatter`, to build our own format of the logs (JSON)."""
  27 
  28     def format(self, record):
  29         record_c = copy.deepcopy(record)
  30         if record_c.args:
  31             for arg in record_c.args:
  32                 record_c.args[arg] = "<>"
  33         return json.dumps(
  34             {
  35                 "levelname": record_c.levelname,
  36                 "module": record_c.module,
  37                 "message": super().format(record_c),
  38             }
  39         )
  40 
  41 
  42 def _parse_theme(config_logger):
  43     theme = dict(
  44         zip(
  45             [key.replace("_", ".") for key in config_logger.keys()],
  46             list(config_logger.values()),
  47         )
  48     )
  49 
  50     theme["log.width"] = None if theme["log.width"] == "-1" else int(theme["log.width"])
  51 
  52     theme["log.height"] = (
  53         None if theme["log.height"] == "-1" else int(theme["log.height"])
  54     )
  55     theme["log.timestamps"] = False
  56     try:
  57         customTheme = Theme(
  58             {
  59                 k: v
  60                 for k, v in theme.items()
  61                 if k not in ["log.width", "log.height", "log.timestamps"]
  62             }
  63         )
  64     except (color.ColorParseError, errors.StyleSyntaxError):
  65         customTheme = None
  66         printf(
  67             "[logging.level.error]It seems your colour configuration couldn't be parsed. Loading the default color configuration...[/logging.level.error]"
  68         )
  69     return customTheme
  70 
  71 
  72 def set_rich_logger(config_logger, verbosity):
  73     """Will set the RichHandler of the logger.
  74 
  75     Parameter
  76     ----------
  77     config_logger :class:
  78         Config object of the logger.
  79     """
  80     theme = _parse_theme(config_logger)
  81     global console
  82     console = Console(theme=theme)
  83     # These keywords Are Highlighted specially.
  84     RichHandler.KEYWORDS = [
  85         "Played",
  86         "animations",
  87         "scene",
  88         "Reading",
  89         "Writing",
  90         "script",
  91         "arguments",
  92         "Invalid",
  93         "Aborting",
  94         "module",
  95         "File",
  96         "Rendering",
  97         "Rendered",
  98     ]
  99     rich_handler = RichHandler(
  100         console=console, show_time=config_logger.getboolean("log_timestamps")
  101     )
  102     global logger
  103     rich_handler.setLevel(verbosity)
  104     logger.addHandler(rich_handler)
  105 
  106 
  107 def set_file_logger(log_file_path):
  108     file_handler = logging.FileHandler(log_file_path, mode="w")
  109     file_handler.setFormatter(JSONFormatter())
  110     global logger
  111     logger.addHandler(file_handler)
  112 
  113 
  114 logger = logging.getLogger("manim")
  115 # The console is set to None as it will be changed by set_rich_logger.
  116 console = None
  117 
  118 # TODO : This is only temporary to keep the terminal output clean when working with ImageMobject and matplotlib plots
  119 logging.getLogger("PIL").setLevel(logging.INFO)
  120 logging.getLogger("matplotlib").setLevel(logging.INFO)
  121
  [end of manim/config/logger.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/manim/config/logger.py b/manim/config/logger.py
  --- a/manim/config/logger.py
  +++ b/manim/config/logger.py
  @@ -10,12 +10,12 @@
   __all__ = ["logger", "console"]
   
   
  -import configparser
   import logging
   
   from rich.console import Console
   from rich.logging import RichHandler
   from rich.theme import Theme
  +from rich.traceback import install
   from rich import print as printf
   from rich import errors, color
   import json
  @@ -114,7 +114,7 @@
   logger = logging.getLogger("manim")
   # The console is set to None as it will be changed by set_rich_logger.
   console = None
  -
  +install()
   # TODO : This is only temporary to keep the terminal output clean when working with ImageMobject and matplotlib plots
   logging.getLogger("PIL").setLevel(logging.INFO)
   logging.getLogger("matplotlib").setLevel(logging.INFO)
  
verification_info: {"golden_diff": "diff --git a/manim/config/logger.py b/manim/config/logger.py\n--- a/manim/config/logger.py\n+++ b/manim/config/logger.py\n@@ -10,12 +10,12 @@\n __all__ = [\"logger\", \"console\"]\n \n \n-import configparser\n import logging\n \n from rich.console import Console\n from rich.logging import RichHandler\n from rich.theme import Theme\n+from rich.traceback import install\n from rich import print as printf\n from rich import errors, color\n import json\n@@ -114,7 +114,7 @@\n logger = logging.getLogger(\"manim\")\n # The console is set to None as it will be changed by set_rich_logger.\n console = None\n-\n+install()\n # TODO : This is only temporary to keep the terminal output clean when working with ImageMobject and matplotlib plots\n logging.getLogger(\"PIL\").setLevel(logging.INFO)\n logging.getLogger(\"matplotlib\").setLevel(logging.INFO)\n", "issue": " [BUG-General] Terminal output not formatted and uses ASCII in windows\n**Describe the bug**\r\nI am on Windows and command prompt and I `cd` into example_scenes directory and run \r\n```sh\r\nmanim basic.py\r\n``` \r\nand I get a output like below.\r\n![teminal-format](https://media.discordapp.net/attachments/581738732646957057/766319441209327728/unknown.png)\r\nI should get in green colour though.\r\n\r\n**To Reproduce**\r\nJust running the one in example_scene in enough.\r\n\r\n**Expected behavior**\r\nThe ill formatted thing should be in green colour.\r\n\r\n**Logs**\r\n<details><summary>Terminal output (Screenshots acceptable)</summary>\r\n\r\n![teminal-format](https://media.discordapp.net/attachments/581738732646957057/766319441209327728/unknown.png)\r\n\r\n<!-- Paste screenshot here -->\r\n\r\n</details>\r\n\r\n**System Specifications**\r\n\r\n<details><summary>System Details</summary>\r\n\r\n- OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)): Windows 7\r\n- Python version (`python/py/python3 --version`): 3.8\r\n\n", "before_files": [{"content": "\"\"\"\nlogger.py\n---------\nThis is the logging library for manim.\nThis library uses rich for coloured log outputs.\n\n\"\"\"\n\n\n__all__ = [\"logger\", \"console\"]\n\n\nimport configparser\nimport logging\n\nfrom rich.console import Console\nfrom rich.logging import RichHandler\nfrom rich.theme import Theme\nfrom rich import print as printf\nfrom rich import errors, color\nimport json\nimport copy\n\n\nclass JSONFormatter(logging.Formatter):\n    \"\"\"Subclass of `:class:`logging.Formatter`, to build our own format of the logs (JSON).\"\"\"\n\n    def format(self, record):\n        record_c = copy.deepcopy(record)\n        if record_c.args:\n            for arg in record_c.args:\n                record_c.args[arg] = \"<>\"\n        return json.dumps(\n            {\n                \"levelname\": record_c.levelname,\n                \"module\": record_c.module,\n                \"message\": super().format(record_c),\n            }\n        )\n\n\ndef _parse_theme(config_logger):\n    theme = dict(\n        zip(\n            [key.replace(\"_\", \".\") for key in config_logger.keys()],\n            list(config_logger.values()),\n        )\n    )\n\n    theme[\"log.width\"] = None if theme[\"log.width\"] == \"-1\" else int(theme[\"log.width\"])\n\n    theme[\"log.height\"] = (\n        None if theme[\"log.height\"] == \"-1\" else int(theme[\"log.height\"])\n    )\n    theme[\"log.timestamps\"] = False\n    try:\n        customTheme = Theme(\n            {\n                k: v\n                for k, v in theme.items()\n                if k not in [\"log.width\", \"log.height\", \"log.timestamps\"]\n            }\n        )\n    except (color.ColorParseError, errors.StyleSyntaxError):\n        customTheme = None\n        printf(\n            \"[logging.level.error]It seems your colour configuration couldn't be parsed. Loading the default color configuration...[/logging.level.error]\"\n        )\n    return customTheme\n\n\ndef set_rich_logger(config_logger, verbosity):\n    \"\"\"Will set the RichHandler of the logger.\n\n    Parameter\n    ----------\n    config_logger :class:\n        Config object of the logger.\n    \"\"\"\n    theme = _parse_theme(config_logger)\n    global console\n    console = Console(theme=theme)\n    # These keywords Are Highlighted specially.\n    RichHandler.KEYWORDS = [\n        \"Played\",\n        \"animations\",\n        \"scene\",\n        \"Reading\",\n        \"Writing\",\n        \"script\",\n        \"arguments\",\n        \"Invalid\",\n        \"Aborting\",\n        \"module\",\n        \"File\",\n        \"Rendering\",\n        \"Rendered\",\n    ]\n    rich_handler = RichHandler(\n        console=console, show_time=config_logger.getboolean(\"log_timestamps\")\n    )\n    global logger\n    rich_handler.setLevel(verbosity)\n    logger.addHandler(rich_handler)\n\n\ndef set_file_logger(log_file_path):\n    file_handler = logging.FileHandler(log_file_path, mode=\"w\")\n    file_handler.setFormatter(JSONFormatter())\n    global logger\n    logger.addHandler(file_handler)\n\n\nlogger = logging.getLogger(\"manim\")\n# The console is set to None as it will be changed by set_rich_logger.\nconsole = None\n\n# TODO : This is only temporary to keep the terminal output clean when working with ImageMobject and matplotlib plots\nlogging.getLogger(\"PIL\").setLevel(logging.INFO)\nlogging.getLogger(\"matplotlib\").setLevel(logging.INFO)\n", "path": "manim/config/logger.py"}]}