Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Don't format logs in log call #5504

Merged
merged 1 commit into from
Jan 27, 2023
Merged

MAINT: Don't format logs in log call #5504

merged 1 commit into from
Jan 27, 2023

Conversation

Carreau
Copy link
Contributor

@Carreau Carreau commented Jan 24, 2023

There are many reason not to use f-string in logs,

There are many reason not to use f-string in logs,
 - Performance, F-strings are eager, so might be slow. Though with
   logging, you can filter before formatting.
 - prevent structured logging or handlers to highlight.
 - Security (untrusted input can lead to DOS on formatting, https://discuss.python.org/t/safer-logging-methods-for-f-strings-and-new-style-formatting/13802)
@github-actions github-actions bot added the qt Relates to qt label Jan 24, 2023
@Carreau Carreau marked this pull request as ready for review January 25, 2023 07:39
Copy link
Member

@andy-sweet andy-sweet left a comment

Choose a reason for hiding this comment

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

Thanks for catching these @Carreau! I'll merge after 24 hours.

@andy-sweet andy-sweet merged commit ca97562 into napari:main Jan 27, 2023
kne42 added a commit to kne42/napari that referenced this pull request Feb 28, 2023
* main: (38 commits)
  Fix `test_worker_with_progress` by wait on worker end (napari#5548)
  Un-set unified title and tool bar on mac (Qt property) (napari#5533)
  Set PYTHONEXECUTABLE as part of macos fixes on (re)startup (napari#5531)
  Fix key error issue of action manager (napari#5539)
  Clean dangling widget in test (napari#5544)
  Use pytest-pretty for better log readability (napari#5525)
  Update vendoring tool to check on matplotlib colormap (napari#5181)
  MAINT: add time limit for CI. (napari#5495)
  Add show_debug notification (napari#5101)
  Overlays 2.0 (napari#4894)
  Clarify layer's editable property and separate interaction with visible property (napari#5413)
  ci(dependabot): bump docker/build-push-action from 3 to 4 (napari#5523)
  Fix opening file dialogs in PySide (napari#5492)
  [pre-commit.ci] pre-commit autoupdate (napari#5518)
  Replace flake8, isort and pyupgrade by ruff, enable additional usefull rules (napari#5513)
  MAINT: Don't format logs in log call (napari#5504)
  Fix conda avaliability check (napari#5496)
  Handle case when QtDims play thread is partially deleted (napari#5499)
  Bugfix: Add missing Enums and Flags required by PySide6 > 6.4 (napari#5480)
  Refactor Main Window status bar to improve information presentation (napari#5451)
  ...
@Czaki Czaki mentioned this pull request Jun 7, 2023
@Czaki Czaki added this to the 0.4.18 milestone Jun 16, 2023
@Czaki Czaki added maintenance PR with maintance changes, triaged-0.4.18 To mark PR that is triaged in 0.4.18 release process labels Jun 16, 2023
Czaki pushed a commit that referenced this pull request Jun 16, 2023
There are many reason not to use f-string in logs,
- Performance, F-strings are eager, so might be slow. Though with
logging, you can filter before formatting.
 - prevent structured logging or handlers to highlight.
- Security (untrusted input can lead to DOS on formatting,
https://discuss.python.org/t/safer-logging-methods-for-f-strings-and-new-style-formatting/13802)
Czaki pushed a commit that referenced this pull request Jun 17, 2023
There are many reason not to use f-string in logs,
- Performance, F-strings are eager, so might be slow. Though with
logging, you can filter before formatting.
 - prevent structured logging or handlers to highlight.
- Security (untrusted input can lead to DOS on formatting,
https://discuss.python.org/t/safer-logging-methods-for-f-strings-and-new-style-formatting/13802)
Czaki pushed a commit that referenced this pull request Jun 18, 2023
There are many reason not to use f-string in logs,
- Performance, F-strings are eager, so might be slow. Though with
logging, you can filter before formatting.
 - prevent structured logging or handlers to highlight.
- Security (untrusted input can lead to DOS on formatting,
https://discuss.python.org/t/safer-logging-methods-for-f-strings-and-new-style-formatting/13802)
Czaki pushed a commit that referenced this pull request Jun 19, 2023
There are many reason not to use f-string in logs,
- Performance, F-strings are eager, so might be slow. Though with
logging, you can filter before formatting.
 - prevent structured logging or handlers to highlight.
- Security (untrusted input can lead to DOS on formatting,
https://discuss.python.org/t/safer-logging-methods-for-f-strings-and-new-style-formatting/13802)
Czaki pushed a commit that referenced this pull request Jun 21, 2023
There are many reason not to use f-string in logs,
- Performance, F-strings are eager, so might be slow. Though with
logging, you can filter before formatting.
 - prevent structured logging or handlers to highlight.
- Security (untrusted input can lead to DOS on formatting,
https://discuss.python.org/t/safer-logging-methods-for-f-strings-and-new-style-formatting/13802)
Czaki pushed a commit that referenced this pull request Jun 21, 2023
There are many reason not to use f-string in logs,
- Performance, F-strings are eager, so might be slow. Though with
logging, you can filter before formatting.
 - prevent structured logging or handlers to highlight.
- Security (untrusted input can lead to DOS on formatting,
https://discuss.python.org/t/safer-logging-methods-for-f-strings-and-new-style-formatting/13802)
Czaki pushed a commit that referenced this pull request Jun 21, 2023
There are many reason not to use f-string in logs,
- Performance, F-strings are eager, so might be slow. Though with
logging, you can filter before formatting.
 - prevent structured logging or handlers to highlight.
- Security (untrusted input can lead to DOS on formatting,
https://discuss.python.org/t/safer-logging-methods-for-f-strings-and-new-style-formatting/13802)
@Carreau Carreau deleted the log-f branch October 2, 2023 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance PR with maintance changes, qt Relates to qt triaged-0.4.18 To mark PR that is triaged in 0.4.18 release process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants