Logger is destroyed during shutdown when it's still in use
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 191
- PR merge metrics
- No merged PRs in 30d
Description
We try to use the logger during shutdown but it appears that methods disappear during garbage collection. This issue pops up when shutdown is called in non-interactive mode. [Here's a thread discussing the same issue](https://bugs.python.org/issue26789).
Stack trace:
```
File "/Users/ellbosch/Repos/mssql-cli/mssqlcli/mssql_cli.py", line 197, in __del__
File "/Users/ellbosch/Repos/mssql-cli/mssqlcli/sqltoolsclient.py", line 90, in shutdown
File "/Users/ellbosch/Repos/mssql-cli/mssqlcli/jsonrpc/jsonrpcclient.py", line 184, in shutdown
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1378, in info
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1514, in _log
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1524, in handle
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1586, in callHandlers
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 894, in handle
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1126, in emit
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1116, in _open
NameError: name 'open' is not defined
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.