prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  [BUG] INFO log level is no longer default for some commands
  ### setuptools version
  
  60.0.0 and newer
  
  ### Python version
  
  Python 3.8
  
  ### OS
  
  OpenSUSE Tumbleweed
  
  ### Additional environment information
  
  _No response_
  
  ### Description
  
  When running certain commands setuptools seems to log at a `WARN` level and not `INFO` level which was the previous default. This appears to have changed with the switch from `stdlib` to `local` distutils vendoring in 60.0.0. 59.8.0 continues to log at an `INFO` level as expected. The latest 60.5.4 release continues to log at a WARN level by default. Commands like `sdist` appear to log at an `INFO` level though making me suspect that this is limited to distutils commands and not those that setuptools has overridden.
  
  The example I've used below is `build_scripts` because it is relatively simple but it seems to affect others as well. Calling this out as recent changing to setuptools logging seem to indicate a desire to maintain backward compat with distutils for now and that seems to have broken though I don't understand how/why. Also, pointing this out in case it points to bigger issues in the local vendoring of distutils.
  
  ### Expected behavior
  
  I expect setuptools to continue logging at INFO level by default.
  
  ### How to Reproduce
  
  1. Create setup.py with scripts entry.
  2. Install setuptools 59.8.0
  3. Run `setup.py build_scripts --dry-run`
  4. Install setuptools 60.0.0
  5. Run `setup.py build_scripts --dry-run`
  6. Note that there is no log.info() message indicating a mode change would occur.
  
  Note that setting -v on the commands does not change the output. Additionally setting SETUPTOOLS_USE_DISTUTILS=stdlib corrects this on newer setuptools indicating the local vendoring is likely to blame.
  
  ### Output
  
  ```console
  $ .tox/py38/bin/pip install -U setuptools==59.8.0
  Collecting setuptools==59.8.0
    Using cached setuptools-59.8.0-py3-none-any.whl (952 kB)
  Installing collected packages: setuptools
    Attempting uninstall: setuptools
      Found existing installation: setuptools 60.0.0
      Uninstalling setuptools-60.0.0:
        Successfully uninstalled setuptools-60.0.0
  Successfully installed setuptools-59.8.0
  $ .tox/py38/bin/python3 setup.py build_scripts --dry-run
  running build_scripts
  creating build/scripts-3.8
  warning: build_scripts: foo/bar.py is an empty file (skipping)
  
  changing mode of build/scripts-3.8/bar.py
  $ .tox/py38/bin/pip install -U setuptools==60.0.0
  Collecting setuptools==60.0.0
    Using cached setuptools-60.0.0-py3-none-any.whl (952 kB)
  Installing collected packages: setuptools
    Attempting uninstall: setuptools
      Found existing installation: setuptools 59.8.0
      Uninstalling setuptools-59.8.0:
        Successfully uninstalled setuptools-59.8.0
  Successfully installed setuptools-60.0.0
  $ .tox/py38/bin/python3 setup.py build_scripts --dry-run
  running build_scripts
  creating build/scripts-3.8
  warning: build_scripts: foo/bar.py is an empty file (skipping)
  
  ```
  
  
  ### Code of Conduct
  
  - [X] I agree to follow the PSF Code of Conduct
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `setuptools/logging.py`
  Content:
  ```
  1 import sys
  2 import logging
  3 import distutils.log
  4 from . import monkey
  5 
  6 
  7 def _not_warning(record):
  8     return record.levelno < logging.WARNING
  9 
  10 
  11 def configure():
  12     """
  13     Configure logging to emit warning and above to stderr
  14     and everything else to stdout. This behavior is provided
  15     for compatibilty with distutils.log but may change in
  16     the future.
  17     """
  18     err_handler = logging.StreamHandler()
  19     err_handler.setLevel(logging.WARNING)
  20     out_handler = logging.StreamHandler(sys.stdout)
  21     out_handler.addFilter(_not_warning)
  22     handlers = err_handler, out_handler
  23     logging.basicConfig(
  24         format="{message}", style='{', handlers=handlers, level=logging.DEBUG)
  25     monkey.patch_func(set_threshold, distutils.log, 'set_threshold')
  26 
  27 
  28 def set_threshold(level):
  29     logging.root.setLevel(level*10)
  30     return set_threshold.unpatched(level)
  31
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/setuptools/logging.py b/setuptools/logging.py
  --- a/setuptools/logging.py
  +++ b/setuptools/logging.py
  @@ -24,6 +24,12 @@
           format="{message}", style='{', handlers=handlers, level=logging.DEBUG)
       monkey.patch_func(set_threshold, distutils.log, 'set_threshold')
   
  +    # For some reason `distutils.log` module is getting cached in `distutils.dist`
  +    # and then loaded again when patched,
  +    # implying: id(distutils.log) != id(distutils.dist.log).
  +    # Make sure the same module object is used everywhere:
  +    distutils.dist.log = distutils.log
  +
   
   def set_threshold(level):
       logging.root.setLevel(level*10)
  
verification_info: {"golden_diff": "diff --git a/setuptools/logging.py b/setuptools/logging.py\n--- a/setuptools/logging.py\n+++ b/setuptools/logging.py\n@@ -24,6 +24,12 @@\n         format=\"{message}\", style='{', handlers=handlers, level=logging.DEBUG)\n     monkey.patch_func(set_threshold, distutils.log, 'set_threshold')\n \n+    # For some reason `distutils.log` module is getting cached in `distutils.dist`\n+    # and then loaded again when patched,\n+    # implying: id(distutils.log) != id(distutils.dist.log).\n+    # Make sure the same module object is used everywhere:\n+    distutils.dist.log = distutils.log\n+\n \n def set_threshold(level):\n     logging.root.setLevel(level*10)\n", "issue": "[BUG] INFO log level is no longer default for some commands\n### setuptools version\n\n60.0.0 and newer\n\n### Python version\n\nPython 3.8\n\n### OS\n\nOpenSUSE Tumbleweed\n\n### Additional environment information\n\n_No response_\n\n### Description\n\nWhen running certain commands setuptools seems to log at a `WARN` level and not `INFO` level which was the previous default. This appears to have changed with the switch from `stdlib` to `local` distutils vendoring in 60.0.0. 59.8.0 continues to log at an `INFO` level as expected. The latest 60.5.4 release continues to log at a WARN level by default. Commands like `sdist` appear to log at an `INFO` level though making me suspect that this is limited to distutils commands and not those that setuptools has overridden.\r\n\r\nThe example I've used below is `build_scripts` because it is relatively simple but it seems to affect others as well. Calling this out as recent changing to setuptools logging seem to indicate a desire to maintain backward compat with distutils for now and that seems to have broken though I don't understand how/why. Also, pointing this out in case it points to bigger issues in the local vendoring of distutils.\n\n### Expected behavior\n\nI expect setuptools to continue logging at INFO level by default.\n\n### How to Reproduce\n\n1. Create setup.py with scripts entry.\r\n2. Install setuptools 59.8.0\r\n3. Run `setup.py build_scripts --dry-run`\r\n4. Install setuptools 60.0.0\r\n5. Run `setup.py build_scripts --dry-run`\r\n6. Note that there is no log.info() message indicating a mode change would occur.\r\n\r\nNote that setting -v on the commands does not change the output. Additionally setting SETUPTOOLS_USE_DISTUTILS=stdlib corrects this on newer setuptools indicating the local vendoring is likely to blame.\n\n### Output\n\n```console\r\n$ .tox/py38/bin/pip install -U setuptools==59.8.0\r\nCollecting setuptools==59.8.0\r\n  Using cached setuptools-59.8.0-py3-none-any.whl (952 kB)\r\nInstalling collected packages: setuptools\r\n  Attempting uninstall: setuptools\r\n    Found existing installation: setuptools 60.0.0\r\n    Uninstalling setuptools-60.0.0:\r\n      Successfully uninstalled setuptools-60.0.0\r\nSuccessfully installed setuptools-59.8.0\r\n$ .tox/py38/bin/python3 setup.py build_scripts --dry-run\r\nrunning build_scripts\r\ncreating build/scripts-3.8\r\nwarning: build_scripts: foo/bar.py is an empty file (skipping)\r\n\r\nchanging mode of build/scripts-3.8/bar.py\r\n$ .tox/py38/bin/pip install -U setuptools==60.0.0\r\nCollecting setuptools==60.0.0\r\n  Using cached setuptools-60.0.0-py3-none-any.whl (952 kB)\r\nInstalling collected packages: setuptools\r\n  Attempting uninstall: setuptools\r\n    Found existing installation: setuptools 59.8.0\r\n    Uninstalling setuptools-59.8.0:\r\n      Successfully uninstalled setuptools-59.8.0\r\nSuccessfully installed setuptools-60.0.0\r\n$ .tox/py38/bin/python3 setup.py build_scripts --dry-run\r\nrunning build_scripts\r\ncreating build/scripts-3.8\r\nwarning: build_scripts: foo/bar.py is an empty file (skipping)\r\n\r\n```\r\n\n\n### Code of Conduct\n\n- [X] I agree to follow the PSF Code of Conduct\n", "before_files": [{"content": "import sys\nimport logging\nimport distutils.log\nfrom . import monkey\n\n\ndef _not_warning(record):\n    return record.levelno < logging.WARNING\n\n\ndef configure():\n    \"\"\"\n    Configure logging to emit warning and above to stderr\n    and everything else to stdout. This behavior is provided\n    for compatibilty with distutils.log but may change in\n    the future.\n    \"\"\"\n    err_handler = logging.StreamHandler()\n    err_handler.setLevel(logging.WARNING)\n    out_handler = logging.StreamHandler(sys.stdout)\n    out_handler.addFilter(_not_warning)\n    handlers = err_handler, out_handler\n    logging.basicConfig(\n        format=\"{message}\", style='{', handlers=handlers, level=logging.DEBUG)\n    monkey.patch_func(set_threshold, distutils.log, 'set_threshold')\n\n\ndef set_threshold(level):\n    logging.root.setLevel(level*10)\n    return set_threshold.unpatched(level)\n", "path": "setuptools/logging.py"}], "after_files": [{"content": "import sys\nimport logging\nimport distutils.log\nfrom . import monkey\n\n\ndef _not_warning(record):\n    return record.levelno < logging.WARNING\n\n\ndef configure():\n    \"\"\"\n    Configure logging to emit warning and above to stderr\n    and everything else to stdout. This behavior is provided\n    for compatibilty with distutils.log but may change in\n    the future.\n    \"\"\"\n    err_handler = logging.StreamHandler()\n    err_handler.setLevel(logging.WARNING)\n    out_handler = logging.StreamHandler(sys.stdout)\n    out_handler.addFilter(_not_warning)\n    handlers = err_handler, out_handler\n    logging.basicConfig(\n        format=\"{message}\", style='{', handlers=handlers, level=logging.DEBUG)\n    monkey.patch_func(set_threshold, distutils.log, 'set_threshold')\n\n    # For some reason `distutils.log` module is getting cached in `distutils.dist`\n    # and then loaded again when patched,\n    # implying: id(distutils.log) != id(distutils.dist.log).\n    # Make sure the same module object is used everywhere:\n    distutils.dist.log = distutils.log\n\n\ndef set_threshold(level):\n    logging.root.setLevel(level*10)\n    return set_threshold.unpatched(level)\n", "path": "setuptools/logging.py"}]}