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

Fixed #34971 -- Doc'd additional loggers. #17492

Closed
wants to merge 4 commits into from
Closed

Conversation

duranbe
Copy link
Contributor

@duranbe duranbe commented Nov 19, 2023

First iteration to improve the Logging configuration by including those three loggers

  • django.dispatch
  • django.contrib.gis
  • django.utils.autoreload

https://code.djangoproject.com/ticket/34971

Still need to deep dive more on it, but here is a first draft !

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello! Thank you for your contribution 💪

As it's your first contribution be sure to check out the patch review checklist.

If you're fixing a ticket from Trac make sure to set the "Has patch" flag and include a link to this PR in the ticket!

If you have any design or process questions then you can ask in the Django forum.

Welcome aboard ⛵️!

@timgraham timgraham changed the title Improve Logging documentation with additional existing loggers Fixed #34971 -- Doc'd additional loggers. Nov 19, 2023
@duranbe
Copy link
Contributor Author

duranbe commented Nov 26, 2023

2nd Iteration to fix issues, add some details, as well as links to the doc

Copy link
Contributor

@nessita nessita left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! Added some initial comments.

``django.contrib.gis``
~~~~~~~~~~~~~~~~~~~~~~~

Logging related to :doc:`contrib/gis/index`, at diverse levels : external GeoSpatial libraries (GEOS, GDAL...), Database Schema and Geometry widget.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please wrap lines at 79 cols? (These guidelines are covered here)

Suggested change
Logging related to :doc:`contrib/gis/index`, at diverse levels : external GeoSpatial libraries (GEOS, GDAL...), Database Schema and Geometry widget.
Logging related to :doc:`contrib/gis/index`, at diverse levels: external
GeoSpatial libraries (GEOS, GDAL...), Database Schema and Geometry widget.


Logging related to :doc:`contrib/gis/index`, at diverse levels : external GeoSpatial libraries (GEOS, GDAL...), Database Schema and Geometry widget.

* In case of a database error the SQL query is added to the log context
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* In case of a database error the SQL query is added to the log context
* On database errors, the offending SQL query is added to the log context.

``django.dispatch``
~~~~~~~~~~~~~~~~~~~

Logger used in :doc:`signals`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Another trailing space :-)

Suggested change
Logger used in :doc:`signals`.
Logger used in :doc:`signals`.

Also, I'm unsure this is the correct reference, the django.dispatch logger is used by the base Signal class which, besides being used by the built-in signals, is also used by any custom signal a project may implement.

Comment on lines +212 to +213
``django.contrib.gis``
~~~~~~~~~~~~~~~~~~~~~~~
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
``django.contrib.gis``
~~~~~~~~~~~~~~~~~~~~~~~
``django.contrib.gis``
~~~~~~~~~~~~~~~~~~~~~~


Logger used in :doc:`signals`.

At the ERROR level the logger adds the following extra context :
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
At the ERROR level the logger adds the following extra context :
At the ERROR level the logger adds the following extra context:

``django.utils.autoreload``
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Log messages related to the autoreload development feature of Django.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Log messages related to the autoreload development feature of Django.
Log messages related to the autoreload development feature of Django.

@felixxm
Copy link
Member

felixxm commented Jan 8, 2024

@duranbe Do you have time to keep working on this?

@nessita
Copy link
Contributor

nessita commented Jan 19, 2024

Closing due to inactivity and in favor of PR #17646.

@nessita nessita closed this Jan 19, 2024
@duranbe
Copy link
Contributor Author

duranbe commented Jan 21, 2024

Hey ! Sorry not answering before, thank you for closing and switching over to another PR, I would not have time to work on it ;(

@nessita
Copy link
Contributor

nessita commented Jan 22, 2024

Hey ! Sorry not answering before, thank you for closing and switching over to another PR, I would not have time to work on it ;(

No worries, and thank you for letting us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants