The function splits the log entries into blocks based on time gaps between timestamps. The threshold for splitting can be provided or calculated based on the gaps in the log timestamps.
Usage
seasonder_splitLog(
threshold = NULL,
threshold_factor = 4,
threshold_quantile = 0.9,
min_threshold_secs = 10
)
Examples
# Enable logging
seasonder_enableLogs()
# Log some messages
seasonder_log("First log entry", "info")
Sys.sleep(0.1)
seasonder_log("Second log entry", "info")
# Split logs into blocks (using a 1-second threshold)
blocks <- seasonder_splitLog(threshold = as.difftime(300, units = "secs"))
str(blocks)
#> List of 1
#> $ : chr [1:285] "[INFO] 2025-04-28 09:33:06.48432: seasonder_createSeaSondeRAPM: APM object created successfully." "[INFO] 2025-04-28 09:33:11.660984: seasonder_createSeaSondeRAPM: APM object created successfully." "[INFO] 2025-04-28 09:33:11.876783: new_SeaSondeRCS: SeaSondeRCS object created successfully." "[INFO] 2025-04-28 09:33:11.891998: seasonder_runMUSIC: MUSIC algorithm started." ...