## TODO: Write header
## TODO: Add if 'DEBUG'
.log_memory_usage <- function(logger, when) {
  debug(logger, paste0(when, ":"))
  mem_info <- capture.output(memuse::Sys.meminfo())
  for (i in mem_info) {
    debug(recipe$Run$logger, i)
  }
  proc_mem <- capture.output(memuse::Sys.procmem())
  for (i in proc_mem) {
    debug(recipe$Run$logger, i)
  }
}
