Skip to content

Logging in lidar-dataprep

Paul Yarin requested to merge loggin-in-lidar-dataprep into develop

Changed lidar-dataprep to use logging. I started with changing all print() calls to use logging. Then, dataprep.py needed to be reconfigured in order to make this work. run_subprocesses also had to be switched around a bit in order for logging to work. Pytest logging produced a lot of complications, the solution ended up being creating the log file in a temp directory and copying it to the output of the test being run.

  • the python files in workspaces/python still use print(). I left them this way because these files are not run from dataprep.py or any of it's subprocesses, so it would be very difficult to use the same logging object in these files as the logging object in the rest of dataprep. And, right now the print() calls in those files are getting logged as output from a process just like many of the other processes, so it works fine.

  • Right now only the step number being run is reported to the console. All the rest of the output goes to the log file. Does this work with the people using dataprep? It is very easy to switch what logs to the console and what logs to the file.

Merge request reports

Loading