logging: improve default logging format (issue5214)
We improve the following things in the logging format: * Show module name instead of just the filename * show level of logging as the first thing * show lineno attached to module:file details Thanks to @blueyed who suggested this on the github issue. It's my first contribution and I have added myself to AUTHORS. I also added to a changelog file.
This commit is contained in:
@@ -15,7 +15,7 @@ from _pytest.compat import dummy_context_manager
|
||||
from _pytest.config import create_terminal_writer
|
||||
from _pytest.pathlib import Path
|
||||
|
||||
DEFAULT_LOG_FORMAT = "%(filename)-25s %(lineno)4d %(levelname)-8s %(message)s"
|
||||
DEFAULT_LOG_FORMAT = "%(levelname)-8s %(name)s:%(filename)s:%(lineno)d %(message)s"
|
||||
DEFAULT_LOG_DATE_FORMAT = "%H:%M:%S"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user