WISDEM / WOMBAT

Windfarm Operations & Maintenance cost-Benefit Analysis Tool
https://wisdem.github.io/WOMBAT/
Apache License 2.0
21 stars 11 forks source link

Update the logging for minor speedups #40

Closed RHammond2 closed 2 years ago

RHammond2 commented 2 years ago

This PR removes the StreamHandler and adds a MemoryHandler with the same target file structure. By storing some of the logging messages in memory and writing them to file all at once, the runtimes see minor speedups. To ensure everything gets written correctly, the WombatEnvironment.run() method catches all errors, flushes the logs, then re-raises the error.