QGEP / qgepqwat2ili

3 stars 3 forks source link

Every log message is logged twice #175

Closed ponceta closed 1 month ago

ponceta commented 1 month ago

Describe the bug Every log message is logged twice

To Reproduce Exact steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots / data If applicable, add screenshots or data to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

ponceta commented 1 month ago

https://github.com/QGEP/qgepqwat2ili/commit/7372cb27e5cfaa7ec6b5f78f3f756666d7589243 Seems to fix this, available in master branch of qgepplugin.

ponceta commented 1 month ago
2024-10-22T10:45:13        qgepplugin:QGEP plugin version 999.0 started
2024-10-22T10:45:13        qgepplugin.utils.translation:Using system default locale: fr_CH
2024-10-22T10:45:49        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:INTEGRITY CHECK organisations subclass data...
2024-10-22T10:45:49        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of organisation datasets: 7
2024-10-22T10:45:49        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of administrative_office datasets: 0
2024-10-22T10:45:49        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of waste_water_association datasets: 0
2024-10-22T10:45:49        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of municipality datasets: 4
2024-10-22T10:45:49        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of canton datasets: 0
2024-10-22T10:45:49        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of cooperative datasets: 0
2024-10-22T10:45:49        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of private datasets: 3
2024-10-22T10:45:49        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of waste_water_treatment_plant datasets: 0
2024-10-22T10:45:49        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:OK: number of subclass elements of class organisation OK in schema qgep_od!
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:INTEGRITY CHECK wastewater_structures subclass data...
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of wastewater_structure datasets: 68713
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of manhole datasets: 21252
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of channel datasets: 46960
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of special_structure datasets: 195
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of infiltration_installation datasets: 144
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of discharge_point datasets: 162
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of wwtp_structure datasets: 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:OK: number of subclass elements of class wastewater_structure OK in schema qgep_od!
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:INTEGRITY CHECK missing identifiers...
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'file' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'data_media' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'maintenance_event' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'organisation' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'wastewater_structure' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'wastewater_networkelement' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'structure_part' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'reach_point' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'pipe_profile' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'catchment_area' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'connection_object' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'control_center' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'hazard_source' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'hydr_geometry' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'hydraulic_char_data' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'measurement_result' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'measurement_series' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'measuring_device' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'measuring_point' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'mechanical_pretreatment' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'overflow' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'overflow_char' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'retention_body' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'river_bank' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'river_bed' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'sector_water_body' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'substance' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'surface_runoff_parameters' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'surface_water_bodies' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'throttle_shut_off_unit' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'waste_water_treatment' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'water_catchment' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'water_control_structure' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'water_course_segment' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'wwtp_energy_use' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'zone' without identifier : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_identifier_count : 0
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:OK: all identifiers set in qgep_od!
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:INTEGRITY CHECK missing MAMDATORY owner references fk_owner...
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'wastewater_structure' without fk_owner : 49
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_owner_count : 49
2024-10-22T10:45:50        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:ERROR: Missing mandatory fk_owner in qgep_od: 49
sjib commented 1 month ago

@ponceta Where can we see print statements and where can we see logger statements? QGIS window, command line, log? Generel question: Do we need both or is logger.debug a good replacement instead of print

ponceta commented 1 month ago

Regarding import and export as they are logged by the python logger, we can see these in the QGIS tww / qgep log panel. If we use commandline we should be able to see these according to the log level (I do not now yet for sure how to set it on the commandline btw). logger.debug is the way to go instead of print yes.

sjib commented 1 month ago

@ponceta Thanks for clarification. Please add what to do for commandline once you know.