Logging and debugging in FaaSr


When FaaSr functions execute in the cloud, errors may happen, and it is important that you add logging information so you can debug these errors. Because FaaS functions are stateless, FaaSr also use cloud S3 bucket storage to persist logging information.

Configuring logging folder in S3

By default, logs are stored in a folder named FaaSrLog in your configured S3 bucket. You can specify a different folder name in your JSON configuration file using the FaaSr JSON Builder, under the General configuration pull-down. Within this folder, for every execution of a workflow, a randomly-generated UUID (a long name that looks like 2f66208d-63eb-4fd9-b54b-7bebcc970421) is created to store the logs for that workflow. The reason a UUID folder is created is to ensure that every FaaSr workflow execution has its own separate logs. In this way, you are able to safely run multiple workflows concurrently, and their logs are separate

Logging from your code

To add a message to the log, use the faasr_log() function, with the following pattern as an example:

log_msg <- paste0('Function compute_sum finished; output written to ', folder, '/', output, ' in default S3 bucket')

Accessing logs

Logs are stored in S3. You may use any S3-compatible client to browse the logs, or use FaaSr functions to help you list and download them.

For example, using minioclient:


We’ll assume UUID 2f66208d-63eb-4fd9-b54b-7bebcc970421 in the examples below; please replace appropriately:


Each action’s log is written as a file with the action’s name and extension .txt. For example, the log for Action1 would be:


While minioclient helps you browse the log files server, FaaSr provides these following helper functions


Queries for all logs in your S3 bucket and writes a data frame with this information to file named faasr_output_logs.txt in your current working directory.


Downloads the logs from the S3 bucket for a particular UUID (which you can determine by inspecting faasr_output_logs.txt)


Deletes a specific log from the S3 bucket given its UUID


Deletes all logs older than (and including) the given date

Locating specific UUID

To find out the specific UUID for a workflow run, you can check the FaaS-specific platform logs.

GitHub Actions

You can go to the FaaSr-created Action repo, and click on the Actions tab, and expand the run Rscript link to see the Action Invocation ID, which matches the UUID for your logs:

Locating UUID for logs, in GitHub Actions
Locating UUID for logs, in GitHub Actions