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

Info log output in version 4.7.1 #461

Open
vsemionov opened this issue Dec 7, 2022 · 5 comments · May be fixed by #479
Open

Info log output in version 4.7.1 #461

vsemionov opened this issue Dec 7, 2022 · 5 comments · May be fixed by #479
Assignees
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@vsemionov
Copy link

#455 changed the queries_quota output from print() to logging (see #451). However, since this library is initialized when our Django application is initialized, the same irrelevant output is scattered in multiple places, like management command output, daily maintenance tasks, report emails, etc. Can we please change this to level DEBUG, so it's hidden by default?

@vsemionov vsemionov added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Dec 7, 2022
@wangela
Copy link
Member

wangela commented Jan 26, 2023

Sounds reasonable. Feel free to send a pull request with your desired fix.

@stianjensen
Copy link

A pull request has been made, can we also get it reviewed and hopefully a fix released soon?

@stianjensen
Copy link

@wangela Would you able to take a look at the proposed PR with a fix?

@sondrelg
Copy link
Contributor

sondrelg commented Apr 2, 2024

In the meantime, fyi, you can also configure the log level for the package in your django application. Setting the handler log level should fix your issue:

LOGGING = {
    "version": 1,
    "disable_existing_loggers": False,
    "handlers": {
        "console": {
            "class": "logging.StreamHandler",
        },
    },
    "google_maps_services_python": {
        ...,
        "level": "WARNING",
    },
}

@vsemionov
Copy link
Author

vsemionov commented Apr 2, 2024

@sondrelg @wangela That's true, but it would also hide any future messages with an info level, and is not optimal. This issue's pull request is a trivial one-line change and has been open since 2022. I don't understand why it's such a problem to merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
4 participants