We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Complete list of logging level for `optuna.logging.set_verbosity`
<!-- Please write a clear and concise description of what content in https://optuna.readthedocs.io/ is an issue. -->
When I read the page of [`optuna.logging.set_verbosity`](https://optuna.readthedocs.io/en/latest/reference/generated/optuna.logging.set_verbosity.html), I suppose that it is nicer to show the complete list of logging levels of optuna on the same page like [`optuna.logging.get_verbosity`](https://optuna.readthedocs.io/en/latest/reference/generated/optuna.logging.get_verbosity.html).

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `optuna/logging.py`
Content:
```
1 import logging
2 from logging import CRITICAL  # NOQA
3 from logging import DEBUG  # NOQA
4 from logging import ERROR  # NOQA
5 from logging import FATAL  # NOQA
6 from logging import INFO  # NOQA
7 from logging import WARN  # NOQA
8 from logging import WARNING  # NOQA
9 import threading
10 
11 import colorlog
12 
13 from optuna import type_checking
14 
15 
16 if type_checking.TYPE_CHECKING:
17     from typing import Optional  # NOQA
18 
19 _lock = threading.Lock()
20 _default_handler = None  # type: Optional[logging.Handler]
21 
22 
23 def create_default_formatter() -> colorlog.ColoredFormatter:
24     """Create a default formatter of log messages.
25 
26     This function is not supposed to be directly accessed by library users.
27     """
28 
29     return colorlog.ColoredFormatter(
30         "%(log_color)s[%(levelname)1.1s %(asctime)s]%(reset)s %(message)s"
31     )
32 
33 
34 def _get_library_name() -> str:
35 
36     return __name__.split(".")[0]
37 
38 
39 def _get_library_root_logger() -> logging.Logger:
40 
41     return logging.getLogger(_get_library_name())
42 
43 
44 def _configure_library_root_logger() -> None:
45 
46     global _default_handler
47 
48     with _lock:
49         if _default_handler:
50             # This library has already configured the library root logger.
51             return
52         _default_handler = logging.StreamHandler()  # Set sys.stderr as stream.
53         _default_handler.setFormatter(create_default_formatter())
54 
55         # Apply our default configuration to the library root logger.
56         library_root_logger = _get_library_root_logger()
57         library_root_logger.addHandler(_default_handler)
58         library_root_logger.setLevel(logging.INFO)
59         library_root_logger.propagate = False
60 
61 
62 def _reset_library_root_logger() -> None:
63 
64     global _default_handler
65 
66     with _lock:
67         if not _default_handler:
68             return
69 
70         library_root_logger = _get_library_root_logger()
71         library_root_logger.removeHandler(_default_handler)
72         library_root_logger.setLevel(logging.NOTSET)
73         _default_handler = None
74 
75 
76 def get_logger(name: str) -> logging.Logger:
77     """Return a logger with the specified name.
78 
79     This function is not supposed to be directly accessed by library users.
80     """
81 
82     _configure_library_root_logger()
83     return logging.getLogger(name)
84 
85 
86 def get_verbosity() -> int:
87     """Return the current level for the Optuna's root logger.
88 
89     Returns:
90         Logging level, e.g., ``optuna.logging.DEBUG`` and ``optuna.logging.INFO``.
91 
92     .. note::
93         Optuna has following logging levels:
94 
95         - ``optuna.logging.CRITICAL``, ``optuna.logging.FATAL``
96         - ``optuna.logging.ERROR``
97         - ``optuna.logging.WARNING``, ``optuna.logging.WARN``
98         - ``optuna.logging.INFO``
99         - ``optuna.logging.DEBUG``
100     """
101 
102     _configure_library_root_logger()
103     return _get_library_root_logger().getEffectiveLevel()
104 
105 
106 def set_verbosity(verbosity: int) -> None:
107     """Set the level for the Optuna's root logger.
108 
109     Args:
110         verbosity:
111             Logging level, e.g., ``optuna.logging.DEBUG`` and ``optuna.logging.INFO``.
112     """
113 
114     _configure_library_root_logger()
115     _get_library_root_logger().setLevel(verbosity)
116 
117 
118 def disable_default_handler() -> None:
119     """Disable the default handler of the Optuna's root logger.
120 
121     Example:
122 
123         Stop and then resume logging to :obj:`sys.stderr`.
124 
125         .. testsetup::
126 
127             def objective(trial):
128                 x = trial.suggest_uniform("x", -100, 100)
129                 y = trial.suggest_categorical("y", [-1, 0, 1])
130                 return x ** 2 + y
131 
132         .. testcode::
133 
134             import optuna
135 
136             study = optuna.create_study()
137 
138             # There are no logs in sys.stderr.
139             optuna.logging.disable_default_handler()
140             study.optimize(objective, n_trials=10)
141 
142             # There are logs in sys.stderr.
143             optuna.logging.enable_default_handler()
144             study.optimize(objective, n_trials=10)
145             # [I 2020-02-23 17:00:54,314] Trial 10 finished with value: ...
146             # [I 2020-02-23 17:00:54,356] Trial 11 finished with value: ...
147             # ...
148 
149     """
150 
151     _configure_library_root_logger()
152 
153     assert _default_handler is not None
154     _get_library_root_logger().removeHandler(_default_handler)
155 
156 
157 def enable_default_handler() -> None:
158     """Enable the default handler of the Optuna's root logger.
159 
160     Please refer to the example shown in :func:`~optuna.logging.disable_default_handler()`.
161     """
162 
163     _configure_library_root_logger()
164 
165     assert _default_handler is not None
166     _get_library_root_logger().addHandler(_default_handler)
167 
168 
169 def disable_propagation() -> None:
170     """Disable propagation of the library log outputs.
171 
172     Note that log propagation is disabled by default.
173     """
174 
175     _configure_library_root_logger()
176     _get_library_root_logger().propagate = False
177 
178 
179 def enable_propagation() -> None:
180     """Enable propagation of the library log outputs.
181 
182     Please disable the Optuna's default handler to prevent double logging if the root logger has
183     been configured.
184 
185     Example:
186 
187         Propagate all log output to the root logger in order to save them to the file.
188 
189         .. testsetup::
190 
191             def objective(trial):
192                 x = trial.suggest_uniform("x", -100, 100)
193                 y = trial.suggest_categorical("y", [-1, 0, 1])
194                 return x ** 2 + y
195 
196         .. testcode::
197 
198             import optuna
199             import logging
200 
201             logger = logging.getLogger()
202 
203             logger.setLevel(logging.INFO)  # Setup the root logger.
204             logger.addHandler(logging.FileHandler("foo.log", mode="w"))
205 
206             optuna.logging.enable_propagation()  # Propagate logs to the root logger.
207             optuna.logging.disable_default_handler()  # Stop showing logs in sys.stderr.
208 
209             study = optuna.create_study()
210 
211             logger.info("Start optimization.")
212             study.optimize(objective, n_trials=10)
213 
214             with open("foo.log") as f:
215                 assert f.readline().startswith("A new study created")
216                 assert f.readline() == "Start optimization.\\n"
217 
218     """
219 
220     _configure_library_root_logger()
221     _get_library_root_logger().propagate = True
222
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/optuna/logging.py b/optuna/logging.py
--- a/optuna/logging.py
+++ b/optuna/logging.py
@@ -109,6 +109,15 @@
     Args:
         verbosity:
             Logging level, e.g., ``optuna.logging.DEBUG`` and ``optuna.logging.INFO``.
+
+    .. note::
+        Optuna has following logging levels:
+
+        - ``optuna.logging.CRITICAL``, ``optuna.logging.FATAL``
+        - ``optuna.logging.ERROR``
+        - ``optuna.logging.WARNING``, ``optuna.logging.WARN``
+        - ``optuna.logging.INFO``
+        - ``optuna.logging.DEBUG``
     """
 
     _configure_library_root_logger()

{"golden_diff": "diff --git a/optuna/logging.py b/optuna/logging.py\n--- a/optuna/logging.py\n+++ b/optuna/logging.py\n@@ -109,6 +109,15 @@\n     Args:\n         verbosity:\n             Logging level, e.g., ``optuna.logging.DEBUG`` and ``optuna.logging.INFO``.\n+\n+    .. note::\n+        Optuna has following logging levels:\n+\n+        - ``optuna.logging.CRITICAL``, ``optuna.logging.FATAL``\n+        - ``optuna.logging.ERROR``\n+        - ``optuna.logging.WARNING``, ``optuna.logging.WARN``\n+        - ``optuna.logging.INFO``\n+        - ``optuna.logging.DEBUG``\n     \"\"\"\n \n     _configure_library_root_logger()\n", "issue": "Complete list of logging level for `optuna.logging.set_verbosity`\n<!-- Please write a clear and concise description of what content in https://optuna.readthedocs.io/ is an issue. -->\r\nWhen I read the page of [`optuna.logging.set_verbosity`](https://optuna.readthedocs.io/en/latest/reference/generated/optuna.logging.set_verbosity.html), I suppose that it is nicer to show the complete list of logging levels of optuna on the same page like [`optuna.logging.get_verbosity`](https://optuna.readthedocs.io/en/latest/reference/generated/optuna.logging.get_verbosity.html).\n", "before_files": [{"content": "import logging\nfrom logging import CRITICAL  # NOQA\nfrom logging import DEBUG  # NOQA\nfrom logging import ERROR  # NOQA\nfrom logging import FATAL  # NOQA\nfrom logging import INFO  # NOQA\nfrom logging import WARN  # NOQA\nfrom logging import WARNING  # NOQA\nimport threading\n\nimport colorlog\n\nfrom optuna import type_checking\n\n\nif type_checking.TYPE_CHECKING:\n    from typing import Optional  # NOQA\n\n_lock = threading.Lock()\n_default_handler = None  # type: Optional[logging.Handler]\n\n\ndef create_default_formatter() -> colorlog.ColoredFormatter:\n    \"\"\"Create a default formatter of log messages.\n\n    This function is not supposed to be directly accessed by library users.\n    \"\"\"\n\n    return colorlog.ColoredFormatter(\n        \"%(log_color)s[%(levelname)1.1s %(asctime)s]%(reset)s %(message)s\"\n    )\n\n\ndef _get_library_name() -> str:\n\n    return __name__.split(\".\")[0]\n\n\ndef _get_library_root_logger() -> logging.Logger:\n\n    return logging.getLogger(_get_library_name())\n\n\ndef _configure_library_root_logger() -> None:\n\n    global _default_handler\n\n    with _lock:\n        if _default_handler:\n            # This library has already configured the library root logger.\n            return\n        _default_handler = logging.StreamHandler()  # Set sys.stderr as stream.\n        _default_handler.setFormatter(create_default_formatter())\n\n        # Apply our default configuration to the library root logger.\n        library_root_logger = _get_library_root_logger()\n        library_root_logger.addHandler(_default_handler)\n        library_root_logger.setLevel(logging.INFO)\n        library_root_logger.propagate = False\n\n\ndef _reset_library_root_logger() -> None:\n\n    global _default_handler\n\n    with _lock:\n        if not _default_handler:\n            return\n\n        library_root_logger = _get_library_root_logger()\n        library_root_logger.removeHandler(_default_handler)\n        library_root_logger.setLevel(logging.NOTSET)\n        _default_handler = None\n\n\ndef get_logger(name: str) -> logging.Logger:\n    \"\"\"Return a logger with the specified name.\n\n    This function is not supposed to be directly accessed by library users.\n    \"\"\"\n\n    _configure_library_root_logger()\n    return logging.getLogger(name)\n\n\ndef get_verbosity() -> int:\n    \"\"\"Return the current level for the Optuna's root logger.\n\n    Returns:\n        Logging level, e.g., ``optuna.logging.DEBUG`` and ``optuna.logging.INFO``.\n\n    .. note::\n        Optuna has following logging levels:\n\n        - ``optuna.logging.CRITICAL``, ``optuna.logging.FATAL``\n        - ``optuna.logging.ERROR``\n        - ``optuna.logging.WARNING``, ``optuna.logging.WARN``\n        - ``optuna.logging.INFO``\n        - ``optuna.logging.DEBUG``\n    \"\"\"\n\n    _configure_library_root_logger()\n    return _get_library_root_logger().getEffectiveLevel()\n\n\ndef set_verbosity(verbosity: int) -> None:\n    \"\"\"Set the level for the Optuna's root logger.\n\n    Args:\n        verbosity:\n            Logging level, e.g., ``optuna.logging.DEBUG`` and ``optuna.logging.INFO``.\n    \"\"\"\n\n    _configure_library_root_logger()\n    _get_library_root_logger().setLevel(verbosity)\n\n\ndef disable_default_handler() -> None:\n    \"\"\"Disable the default handler of the Optuna's root logger.\n\n    Example:\n\n        Stop and then resume logging to :obj:`sys.stderr`.\n\n        .. testsetup::\n\n            def objective(trial):\n                x = trial.suggest_uniform(\"x\", -100, 100)\n                y = trial.suggest_categorical(\"y\", [-1, 0, 1])\n                return x ** 2 + y\n\n        .. testcode::\n\n            import optuna\n\n            study = optuna.create_study()\n\n            # There are no logs in sys.stderr.\n            optuna.logging.disable_default_handler()\n            study.optimize(objective, n_trials=10)\n\n            # There are logs in sys.stderr.\n            optuna.logging.enable_default_handler()\n            study.optimize(objective, n_trials=10)\n            # [I 2020-02-23 17:00:54,314] Trial 10 finished with value: ...\n            # [I 2020-02-23 17:00:54,356] Trial 11 finished with value: ...\n            # ...\n\n    \"\"\"\n\n    _configure_library_root_logger()\n\n    assert _default_handler is not None\n    _get_library_root_logger().removeHandler(_default_handler)\n\n\ndef enable_default_handler() -> None:\n    \"\"\"Enable the default handler of the Optuna's root logger.\n\n    Please refer to the example shown in :func:`~optuna.logging.disable_default_handler()`.\n    \"\"\"\n\n    _configure_library_root_logger()\n\n    assert _default_handler is not None\n    _get_library_root_logger().addHandler(_default_handler)\n\n\ndef disable_propagation() -> None:\n    \"\"\"Disable propagation of the library log outputs.\n\n    Note that log propagation is disabled by default.\n    \"\"\"\n\n    _configure_library_root_logger()\n    _get_library_root_logger().propagate = False\n\n\ndef enable_propagation() -> None:\n    \"\"\"Enable propagation of the library log outputs.\n\n    Please disable the Optuna's default handler to prevent double logging if the root logger has\n    been configured.\n\n    Example:\n\n        Propagate all log output to the root logger in order to save them to the file.\n\n        .. testsetup::\n\n            def objective(trial):\n                x = trial.suggest_uniform(\"x\", -100, 100)\n                y = trial.suggest_categorical(\"y\", [-1, 0, 1])\n                return x ** 2 + y\n\n        .. testcode::\n\n            import optuna\n            import logging\n\n            logger = logging.getLogger()\n\n            logger.setLevel(logging.INFO)  # Setup the root logger.\n            logger.addHandler(logging.FileHandler(\"foo.log\", mode=\"w\"))\n\n            optuna.logging.enable_propagation()  # Propagate logs to the root logger.\n            optuna.logging.disable_default_handler()  # Stop showing logs in sys.stderr.\n\n            study = optuna.create_study()\n\n            logger.info(\"Start optimization.\")\n            study.optimize(objective, n_trials=10)\n\n            with open(\"foo.log\") as f:\n                assert f.readline().startswith(\"A new study created\")\n                assert f.readline() == \"Start optimization.\\\\n\"\n\n    \"\"\"\n\n    _configure_library_root_logger()\n    _get_library_root_logger().propagate = True\n", "path": "optuna/logging.py"}], "after_files": [{"content": "import logging\nfrom logging import CRITICAL  # NOQA\nfrom logging import DEBUG  # NOQA\nfrom logging import ERROR  # NOQA\nfrom logging import FATAL  # NOQA\nfrom logging import INFO  # NOQA\nfrom logging import WARN  # NOQA\nfrom logging import WARNING  # NOQA\nimport threading\n\nimport colorlog\n\nfrom optuna import type_checking\n\n\nif type_checking.TYPE_CHECKING:\n    from typing import Optional  # NOQA\n\n_lock = threading.Lock()\n_default_handler = None  # type: Optional[logging.Handler]\n\n\ndef create_default_formatter() -> colorlog.ColoredFormatter:\n    \"\"\"Create a default formatter of log messages.\n\n    This function is not supposed to be directly accessed by library users.\n    \"\"\"\n\n    return colorlog.ColoredFormatter(\n        \"%(log_color)s[%(levelname)1.1s %(asctime)s]%(reset)s %(message)s\"\n    )\n\n\ndef _get_library_name() -> str:\n\n    return __name__.split(\".\")[0]\n\n\ndef _get_library_root_logger() -> logging.Logger:\n\n    return logging.getLogger(_get_library_name())\n\n\ndef _configure_library_root_logger() -> None:\n\n    global _default_handler\n\n    with _lock:\n        if _default_handler:\n            # This library has already configured the library root logger.\n            return\n        _default_handler = logging.StreamHandler()  # Set sys.stderr as stream.\n        _default_handler.setFormatter(create_default_formatter())\n\n        # Apply our default configuration to the library root logger.\n        library_root_logger = _get_library_root_logger()\n        library_root_logger.addHandler(_default_handler)\n        library_root_logger.setLevel(logging.INFO)\n        library_root_logger.propagate = False\n\n\ndef _reset_library_root_logger() -> None:\n\n    global _default_handler\n\n    with _lock:\n        if not _default_handler:\n            return\n\n        library_root_logger = _get_library_root_logger()\n        library_root_logger.removeHandler(_default_handler)\n        library_root_logger.setLevel(logging.NOTSET)\n        _default_handler = None\n\n\ndef get_logger(name: str) -> logging.Logger:\n    \"\"\"Return a logger with the specified name.\n\n    This function is not supposed to be directly accessed by library users.\n    \"\"\"\n\n    _configure_library_root_logger()\n    return logging.getLogger(name)\n\n\ndef get_verbosity() -> int:\n    \"\"\"Return the current level for the Optuna's root logger.\n\n    Returns:\n        Logging level, e.g., ``optuna.logging.DEBUG`` and ``optuna.logging.INFO``.\n\n    .. note::\n        Optuna has following logging levels:\n\n        - ``optuna.logging.CRITICAL``, ``optuna.logging.FATAL``\n        - ``optuna.logging.ERROR``\n        - ``optuna.logging.WARNING``, ``optuna.logging.WARN``\n        - ``optuna.logging.INFO``\n        - ``optuna.logging.DEBUG``\n    \"\"\"\n\n    _configure_library_root_logger()\n    return _get_library_root_logger().getEffectiveLevel()\n\n\ndef set_verbosity(verbosity: int) -> None:\n    \"\"\"Set the level for the Optuna's root logger.\n\n    Args:\n        verbosity:\n            Logging level, e.g., ``optuna.logging.DEBUG`` and ``optuna.logging.INFO``.\n\n    .. note::\n        Optuna has following logging levels:\n\n        - ``optuna.logging.CRITICAL``, ``optuna.logging.FATAL``\n        - ``optuna.logging.ERROR``\n        - ``optuna.logging.WARNING``, ``optuna.logging.WARN``\n        - ``optuna.logging.INFO``\n        - ``optuna.logging.DEBUG``\n    \"\"\"\n\n    _configure_library_root_logger()\n    _get_library_root_logger().setLevel(verbosity)\n\n\ndef disable_default_handler() -> None:\n    \"\"\"Disable the default handler of the Optuna's root logger.\n\n    Example:\n\n        Stop and then resume logging to :obj:`sys.stderr`.\n\n        .. testsetup::\n\n            def objective(trial):\n                x = trial.suggest_uniform(\"x\", -100, 100)\n                y = trial.suggest_categorical(\"y\", [-1, 0, 1])\n                return x ** 2 + y\n\n        .. testcode::\n\n            import optuna\n\n            study = optuna.create_study()\n\n            # There are no logs in sys.stderr.\n            optuna.logging.disable_default_handler()\n            study.optimize(objective, n_trials=10)\n\n            # There are logs in sys.stderr.\n            optuna.logging.enable_default_handler()\n            study.optimize(objective, n_trials=10)\n            # [I 2020-02-23 17:00:54,314] Trial 10 finished with value: ...\n            # [I 2020-02-23 17:00:54,356] Trial 11 finished with value: ...\n            # ...\n\n    \"\"\"\n\n    _configure_library_root_logger()\n\n    assert _default_handler is not None\n    _get_library_root_logger().removeHandler(_default_handler)\n\n\ndef enable_default_handler() -> None:\n    \"\"\"Enable the default handler of the Optuna's root logger.\n\n    Please refer to the example shown in :func:`~optuna.logging.disable_default_handler()`.\n    \"\"\"\n\n    _configure_library_root_logger()\n\n    assert _default_handler is not None\n    _get_library_root_logger().addHandler(_default_handler)\n\n\ndef disable_propagation() -> None:\n    \"\"\"Disable propagation of the library log outputs.\n\n    Note that log propagation is disabled by default.\n    \"\"\"\n\n    _configure_library_root_logger()\n    _get_library_root_logger().propagate = False\n\n\ndef enable_propagation() -> None:\n    \"\"\"Enable propagation of the library log outputs.\n\n    Please disable the Optuna's default handler to prevent double logging if the root logger has\n    been configured.\n\n    Example:\n\n        Propagate all log output to the root logger in order to save them to the file.\n\n        .. testsetup::\n\n            def objective(trial):\n                x = trial.suggest_uniform(\"x\", -100, 100)\n                y = trial.suggest_categorical(\"y\", [-1, 0, 1])\n                return x ** 2 + y\n\n        .. testcode::\n\n            import optuna\n            import logging\n\n            logger = logging.getLogger()\n\n            logger.setLevel(logging.INFO)  # Setup the root logger.\n            logger.addHandler(logging.FileHandler(\"foo.log\", mode=\"w\"))\n\n            optuna.logging.enable_propagation()  # Propagate logs to the root logger.\n            optuna.logging.disable_default_handler()  # Stop showing logs in sys.stderr.\n\n            study = optuna.create_study()\n\n            logger.info(\"Start optimization.\")\n            study.optimize(objective, n_trials=10)\n\n            with open(\"foo.log\") as f:\n                assert f.readline().startswith(\"A new study created\")\n                assert f.readline() == \"Start optimization.\\\\n\"\n\n    \"\"\"\n\n    _configure_library_root_logger()\n    _get_library_root_logger().propagate = True\n", "path": "optuna/logging.py"}]}