NTNU-IndEcol / BuildME

6 stars 1 forks source link

Do we need loging? #61

Open nheeren opened 2 years ago

nheeren commented 2 years ago

I was just thinking, maybe at L.489 (in idf.py) the comment # we don't have ASHRAE values for these cases, skip insulation could become a logging.warning()? This seems to be the kind of information that should be made clear when it happens.

I was just thinking of adding a logger to BuildME to help better document each run, similar to what is done in ODYM-RECC main.py does. What do you think? In the meantime, we could add simple logging statements (or even prints) for cases like this?

Originally posted by @CBreton026 in https://github.com/nheeren/BuildME/issues/47#issuecomment-1092387108

It was me that introduced logging to ODYM and I often use it in larger models. But so far I didn't see the necessity. But your comment makes me wonder... BuildME already writes the output of e+ to log files. So maybe we do the same for other output like this.

CBreton026 commented 2 years ago

@nheeren I didn't know you were the one that added logging to ODYM!

I think it could be useful, especially to leave a trace of assumptions/defaults that may be in the source code, as these can be hard to track.

It could also make each BuildME run easier to understand / review / replicate. I think BuildME should eventually do the same thing that ODYM does to facilitate replication studies (e.g. copy the run's settings and modified files to the results folder) so that anyone can 'run' it again easily.

nheeren commented 2 years ago

Yes. I agree. The replication aspect would be a real value added. That means we would write all settings that were used, such as

into a log file. For me personally low priority, but please go ahead to make a first draft if anyone feels like it.