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

0.2.0b6 / Logger warnings about more than 1 link #123

Closed
pxFIN opened this issue Feb 21, 2024 · 2 comments · Fixed by #124
Closed

0.2.0b6 / Logger warnings about more than 1 link #123

pxFIN opened this issue Feb 21, 2024 · 2 comments · Fixed by #124
Milestone

Comments

@pxFIN
Copy link

pxFIN commented Feb 21, 2024

In my case i rebooted host 2 hours ago and

Logger: custom_components.feedparser.sensor
Source: custom_components/feedparser/sensor.py:268
Integration: feedparser (documentation, issues)
First occurred: 14:06:15 (5668 occurrences)
Last logged: 16:19:17

Warnings are about more than one link so basically this:

    def _process_link(self: FeedParserSensor, feed_entry: FeedParserDict) -> str:
        """Return link from feed entry."""
        if "links" in feed_entry:
            if len(feed_entry["links"]) > 1:
                _LOGGER.warning(
                    "Feed %s: More than one link found for %s. Using the first link.",
                    self.name,
                    feed_entry,
                )
            return feed_entry["links"][0]["href"]
        return ""

Which is OK relevant for some feeds but 'accidentally' noticed on one HA host when trying to download diagnostics logs it was 438 megabytes of which major part is feedparser/warning

Just wondering if _LOGGER.warning is the best choice ?

@ogajduse
Copy link
Collaborator

Thank you for pointing that out. I will change warning level to debug so people do not end up with bulky logs. If not today, I should do a release in a few days.

@ogajduse ogajduse linked a pull request Feb 25, 2024 that will close this issue
@ogajduse
Copy link
Collaborator

@ogajduse ogajduse added this to the Release 0.2.0 milestone Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants