mjhoptics / ray-optics

geometric ray tracing for optical systems
BSD 3-Clause "New" or "Revised" License
263 stars 54 forks source link

Delay creation of log files until the first actual message to prevent creating empty files #144

Closed dominikonysz closed 5 months ago

dominikonysz commented 5 months ago

Hey again, I've just realized that resulting from #143 the log files cv_cmd_proc.log and zmx_read_lens.log were always created independent of actually logging something into them because the FileHandler was initialized on module level and thus when importing any of the modules. These creations should now be delayed until logging to the file for the first time and thus solve that problem.