stan icon indicating copy to clipboard operation
stan copied to clipboard

Redesign loggers

Open syclik opened this issue 6 years ago • 1 comments

Summary:

From @bob-carpenter

Our loggers should just take these, as in:

logger.info() << "Gradient evaluation took " << ...; Or we should have a polyadic info function that could look like:

logger.info("Gradient evaluation took ", deltaT, " seconds");

Description:

Our loggers were introduced as a stepping stone to getting us to a better design.

We can use this issue to discuss different designs for the loggers.

Additional Information:

cc @sakrejda

Original comment from: https://github.com/stan-dev/stan/pull/2570#r201154784

Current Version:

v2.17.1

syclik avatar Jul 10 '18 14:07 syclik

The current implementations are:

https://github.com/stan-dev/stan/blob/develop/src/stan/callbacks/logger.hpp https://github.com/stan-dev/stan/blob/develop/src/stan/callbacks/stream_logger.hpp

As used in CmdStan, the calling function instantiates a logger where debug and info messages are sent to std::cout and the rest are sent to std::cerr - https://github.com/stan-dev/cmdstan/blob/4a34c4786d30da566ded7c4ad0e16b9ec189571a/src/cmdstan/command.hpp#L289-L290

mitzimorris avatar Jan 22 '22 23:01 mitzimorris