if (FALSE) {
log_level(INFO, 'hi there')
log_info('hi there')
## output omitted
log_debug('hi there')
## lower threshold and retry
log_threshold(TRACE)
log_debug('hi there')
## multiple lines
log_info('ok {1:3} + {1:3} = {2*(1:3)}')
log_layout(layout_json())
log_info('ok {1:3} + {1:3} = {2*(1:3)}')
## note for the JSON output, glue is not automatically applied
log_info(glue::glue('ok {1:3} + {1:3} = {2*(1:3)}'))
}
Run the code above in your browser using DataLab