-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
Logging errors works. Splitting logs into separate files would though improve readability.
I would suggest one file for each of the following
- general logging (currently done to the console)
- ohsome response
- ohsome query parameters
- ohsome bpolys parameter (if used)
the bboxes parameter is geojson but gets invalid when duped to json due to escaping. Also the geojson may get quite large even with a small amount of geometries making the log hard to read (see ohsome_exception_20210312T165323.json.txt)
This is some code I use for logging but that may not be good code!
#!/usr/bin/python
import os
global filepath
filepath=os.path.dirname(os.path.realpath(__file__))
import logging
logging.basicConfig(filename=os.path.join(filepath,'temp_automatic_workflow.log'),filemode='w',level=logging.DEBUG,format='%(asctime)s %(levelname)s %(message)s',force=True)
Metadata
Metadata
Assignees
Labels
No labels