backgroudjobR
is designed to be verbose and
informative. Our philosophy is to provide you with as much
useful information as possible to help you monitor. Sorry for few
options provided.
Key Logging Advantages
📊 Comprehensive Execution Tracking
-
Step-by-step execution: Each command is logged with
clear
running
anddone
status -
Progress indicators: Shows current step progress
(e.g.,
1/4
,2/4
) - Precise timestamps: Every action is timestamped for accurate timing analysis
💾 Real-time Memory Monitoring
- Memory usage tracking: Monitors memory consumption after each step
- Performance insights: Helps identify memory-intensive operations
- Resource optimization: Enables better resource management decisions
🔍 Detailed Session Information
-
Complete R environment: Full
sessionInfo()
including R version, platform, and packages - Reproducibility support: Detailed environment information for debugging
- Dependency tracking: Shows all loaded packages and their versions
⚠️ Advanced Error Handling
- Precise error location: Identifies exactly which step failed
- Detailed error messages: Provides complete error descriptions
-
Environment preservation: Automatically saves the
error environment to
.qs2
files for post-mortem analysis - Quick debugging: Resume debugging with preserved variable states
Log Format Overview
[Timestamp] Status: Command/Information
[Timestamp] Memory used by current session: XX.XX MB
[Timestamp] Session Info: [Detailed R environment]
Whether your job succeeds or encounters
errors, backgroudjobR
ensures you have all the
information needed to understand what happened, when it happened, and
how to fix any issues that arise.
Successful Example
[2025-07-16 12:57:26]---BackgroundJobR Session---
[2025-07-16 12:57:26]Session ID: backgroud_job_sssa
[2025-07-16 12:57:26]running:(1/4) zz <- data.frame(a = c(1, 2), z = c(2, 3))
[2025-07-16 12:57:26]done:zz <- data.frame(a = c(1, 2), z = c(2, 3))
[2025-07-16 12:57:26]Memory used by current session:91.818 MB
[2025-07-16 12:57:26]running:(2/4) library(dplyr)
[2025-07-16 12:57:26]done:library(dplyr)
[2025-07-16 12:57:26]Memory used by current session:94.917 MB
[2025-07-16 12:57:26]running:(3/4) zz <- dplyr::mutate(zz, ab = c(1, 2)) %>% dplyr::rename(c = a)
[2025-07-16 12:57:26]done:zz <- dplyr::mutate(zz, ab = c(1, 2)) %>% dplyr::rename(c = a)
[2025-07-16 12:57:26]Memory used by current session:97.012 MB
[2025-07-16 12:57:26]running:(4/4) bb <- 1 + 2
[2025-07-16 12:57:26]done:bb <- 1 + 2
[2025-07-16 12:57:26]Memory used by current session:97.012 MB
[2025-07-16 12:57:26]Session Info:
R version 4.5.0 (2025-04-11)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.2
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.1
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: Asia/Shanghai
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] dplyr_1.1.4 backgroudjobR_0.1.0 cli_3.6.5
loaded via a namespace (and not attached):
[1] compiler_4.5.0 highr_0.11 tidyselect_1.2.1 Rcpp_1.0.14 xml2_1.3.8
[6] stringr_1.5.1 callr_3.7.6 yaml_2.3.10 fastmap_1.2.0 R6_2.6.1
[11] lobstr_1.1.2 generics_0.1.4 nanonext_1.6.1 knitr_1.50 tibble_3.2.1
[16] mirai_2.4.0 desc_1.4.3 stringfish_0.16.0 rprojroot_2.0.4 pillar_1.10.2
[21] rlang_1.1.6 attachment_0.4.5 stringi_1.8.7 roxygen2_7.3.2 xfun_0.52
[26] fs_1.6.6 sys_3.4.3 RcppParallel_5.1.10 pkgload_1.4.0 withr_3.0.2
[31] magrittr_2.0.3 qs2_0.1.5 ps_1.9.1 digest_0.6.37 processx_3.8.6
[36] rstudioapi_0.17.1 askpass_1.2.1 lifecycle_1.0.4 prettyunits_1.2.0 vctrs_0.6.5
[41] evaluate_1.0.3 glue_1.8.0 pkgbuild_1.4.8 rmarkdown_2.29 purrr_1.1.0
[46] pkgconfig_2.0.3 tools_4.5.0 htmltools_0.5.8.1
Error example
[2025-07-16 12:59:39]---BackgroundJobR Session---
[2025-07-16 12:59:39]Session ID: backgroud_job_sssa
[2025-07-16 12:59:39]running:(1/4) zz <- data.frame(a = c(1, 2), z = c(2, 3))
[2025-07-16 12:59:39]done:zz <- data.frame(a = c(1, 2), z = c(2, 3))
[2025-07-16 12:59:39]Memory used by current session:99.966 MB
[2025-07-16 12:59:39]running:(2/4) library(dplyr)
[2025-07-16 12:59:39]done:library(dplyr)
[2025-07-16 12:59:39]Memory used by current session:99.967 MB
[2025-07-16 12:59:39]running:(3/4) zz <- dplyr::mutate(zz, ab = c(1, 2)) %>% dplyr::rename(zzzz = vvvv)
[2025-07-16 12:59:39]Error at Step 3
[2025-07-16 12:59:39]Error Message:Can't rename columns that don't exist.
[31m✖[39m Column `vvvv` doesn't exist.
[2025-07-16 12:59:39]On error environment saved to: backgroud_job_yourID/objs.qs2