eldang / elevation_lookups

Takes an input file of paths described as series of points, outputs a file of data about the elevation changes along those paths.
Apache License 2.0
3 stars 2 forks source link

[outside A/B Street scope] Get Python's native logging working in child processes #19

Open eldang opened 3 years ago

eldang commented 3 years ago

Out of the box, Python's logging module does not play well with its multiprocessing module. For the time being I've worked around this by passing the log level to child processes as a parameter, and writing some clunky conditional print statements in the parallel worker functions. This is perfectly usable, but ugly. I know that there are some well established workarounds for this restriction, so I would like to eventually implement one and stick to exclusively using the logger for console output for consistency.