daroczig / logger

A lightweight, modern and flexible, log4j and futile.logger inspired logging utility for R
https://daroczig.github.io/logger
280 stars 41 forks source link

Example of logging a matrix? #72

Closed alexpghayes closed 3 years ago

alexpghayes commented 3 years ago

Would you mind adding an example of how to log a matrix to the documentation or here? Struggling to figure out how to piece all the individual components together.

I thought something like

log_debug("S_tilde is:")
log_formatter(formatter_paste())
log_debug(S_tilde)
log_formatter(formatter_glue())
log_debug("Expected edges: {expected_edges}")
log_debug("Observed edges: {m}")

would work, but the log_debug(S_tilde) line is throwing an error.

alexpghayes commented 3 years ago

Ah I added extra parenthesis.