-
Type: Bug
-
Resolution: Gone away
-
Priority: Unknown
-
None
-
Affects Version/s: 4.8
-
Component/s: Logging
-
None
-
Python Drivers
Detailed steps to reproduce the problem?
Enable logging and observe the output. It is always formatted as a JSON log (structured log) with an arbitrary format and not under control of the app.
Definition of done: what must be done to consider the task complete?
Have formatting done by a proper PyMongo formatter (see https://docs.python.org/3/howto/logging.html) or have a way to override formatting in the LogMessage class so apps can chose what they want logged and how. Specifically filter fields, print the message in json format or not.
The exact Python version used, with patch level:
3.11.4 (main, Jun 20 2023, 16:59:59) [Clang 14.0.3 (clang-1403.0.22.14.1)]
The exact version of PyMongo used, with patch level:
4.7.2
True
Describe how MongoDB is set up. Local vs Hosted, version, topology, load balanced, etc.
The operating system and version (e.g. Windows 7, OSX 10.8, ...)
Web framework or asynchronous network library used, if any, with version (e.g. Django 1.7, mod_wsgi 4.3.0, gevent 1.0.1, Tornado 4.0.2, ...)
Security Vulnerabilities
If you’ve identified a security vulnerability in a driver or any other MongoDB project, please report it according to the instructions here
- related to
-
PYTHON-3457 Easier debugging with standardized logging: logging specification
- Closed
-
PYTHON-4261 Log line for "Waiting for suitable server to become available" is too noisy
- Closed