## 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()

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.

axecute("my_script.R")

### 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 also 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:

• Version of the package
• Type of build
• Link to the GitHub repository
• User and File Information
• User that generated the log
• Name and path of the script for which the log was generated
• hash_sum: A unique hashsum is created for the log file
• Session Information: The R session information
• R version
• OS and system
• GUI
• Language and timezone
• Packages - List of all available packages in the environment
• External Software - List of all external software
Below we have a scrollabe example of what is included in a log file for an adsl.R script.