RMI-PACTA / workflow.transition.monitor

This repository is used to create the docker image that runs the transition monitor platform.
Other
2 stars 0 forks source link

add some basic logging #70

Open jdhoffa opened 1 year ago

jdhoffa commented 1 year ago

similar to pacta.data.preparation, so that we know what is going on, and where things are failing etc.

cjyetman commented 1 year ago

FYI... there is this https://github.com/RMI-PACTA/pacta.portfolio.analysis/blob/main/R/write_log.R which we have used in the past to not flood stdout with messages making it difficult to parse, but still get important messages in the error log. It's not widely used though, tbh.

jdhoffa commented 1 year ago

Hmmm. We should maybe consider how we treat logging. write_log feels like something that should actually exist in the workflow.transition.monitor repo. Or perhaps in a "workflow.utils" package.

But yes, that is useful.

I agree with not flooding STDOut, although I think some basic indication of what is going on could be helpful

cjyetman commented 1 year ago

We also have a few cli::cli_h1() commands that do print to stdout, like... https://github.com/RMI-PACTA/workflow.transition.monitor/blob/4bcd1e5765aee04e93d33abdf5bdcc5855587a42/web_tool_script_1.R#L10

but I'm not sure either will really help with what you're talking about, because they only work when there is not a problem. Errors do get sent to stdout though.

cjyetman commented 1 year ago

relevant discussion here https://github.com/RMI-PACTA/pacta.portfolio.analysis/issues/235