Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python-stdlib/logging/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def basicConfig(
else:
handler = FileHandler(filename, filemode, encoding)

handler.setLevel(level)
handler.setLevel(NOTSET)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default level is NOTSET (see Handler constructor), so I think a simpler and equivalent fix would be to just remove this line.

handler.setFormatter(Formatter(format, datefmt))

logger.setLevel(level)
Expand Down
Loading