Generating a log

The purpose of the logrx package is to generate a log upon execution of an R script which enables traceability and reproducibility of the executed code. Generating a log with {logrx} can be as simple as running one line of code as seen in the below example of how to use the axecute() function.. However, {logrx} has much more advanced capabilities to meet the demands of Clinical Reporting. To learn additional techniques about executing code with {logrx} please visit our Execution Vignette.


axecute() enables the command line submission of a program. A log is set-up around the program, and its code is run safely and loudly (using safely() from the purrr package). The log will be generated in the same folder as the script unless you specify differently.


logrx addin:

A log can be generated using the {logrx} addin, which is a simple point and click interface that allows you to run a single program. The Addin ships with the package and is available once you use install the package. The gif on the Get Started page gives a quick snapshot of its intended use.

Log attributes

We have compiled a brief overview of the information that we capture in the log file generated by {logrx}. We allow users to customize sections of the log based on their needs for a log, e.g. you can toggle on/off the messages, outputs, errors and messages. You can also build into your log approved and unapproved packages used in your R script - see Logging Unapproved Package and Function Use for additional guidance

The following attributes are recorded in the log:

Below we have a scrollable example of what is included in a log file for an adsl.R script.