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

Output are print-statements, not logging... integration challenge #83

Open
vingerha opened this issue May 9, 2024 · 0 comments
Open

Comments

@vingerha
Copy link
Contributor

vingerha commented May 9, 2024

I am using the library a lot ..i.e. I have a growing set of end users in Home Assistant
As the data is often not (very) good, the logs help me to identify things quicker.
However, pygtfs is not sending out logs but print statements and these are not shown in the Home Assistant logs, also resulting in not showing errors when extracting.
Can you add a proper log output or is this too complex?

2024-05-09 09:14:13.750 DEBUG (MainThread) [custom_components.gtfs2.config_flow] Checkdata pygtfs: extracting with data: {'extract_from': 'url', 'file': 'vv', 'url': 'https://cdn.mbta.com/MBTA_GTFS.zip'}
Loading GTFS data for <class 'pygtfs.gtfs_entities.Agency'>:
Loading GTFS data for <class 'pygtfs.gtfs_entities.Stop'>:
Loading GTFS data for <class 'pygtfs.gtfs_entities.Transfer'>:
Loading GTFS data for <class 'pygtfs.gtfs_entities.Route'>:
Loading GTFS data for <class 'pygtfs.gtfs_entities.Fare'>:
Loading GTFS data for <class 'pygtfs.gtfs_entities.FareRule'>:
Loading GTFS data for <class 'pygtfs.gtfs_entities.ShapePoint'>:
Loading GTFS data for <class 'pygtfs.gtfs_entities.Service'>:
...
   for gtfs_class in gtfs_all:
        print('Loading GTFS data for %s:' % gtfs_class)
        gtfs_filename = gtfs_class.__tablename__ + '.txt'
@vingerha vingerha changed the title Output are prin-statements, not logging... integration challenge Output are print-statements, not logging... integration challenge May 9, 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

No branches or pull requests

1 participant