I am very excited about the new logging interface, as I think it would allow numerical algorithms to emit debugging information in a way that does not interrupt the process, but should allow the user to examine parts of a calculation with the exact same input.
Eg a concrete use case, consider a log-likelihood that should always evaluate to
-Inf or a finite real number. If that’s not the case (eg
NaN), the logger could emit the parameters. I have some questions on practice though:
Is it OK to pass composite types that are defined in a specific module to the logger? This would allow eg a custom
showmethod that would just print a small summary, instead of dumping 50 lines of numbers, yet also contain detailed information for inspection. My concern is that this would be opaque to other packages.
If the package defines a specific logger to filter its own debug messages, what’s the best way to compose such loggers, so that multiple packages can cooperate smoothly?
Pointers to examples, if any, would also be appreciated.