Skip to contents

Use this to get the path to the formods log file

Usage

FM_fetch_log_path(state)

Arguments

state

module state after yaml read

Value

Character string with the path to the log file.

Examples

# Within shiny a session variable will exist,
# this creates one here for testing purposes:
sess_res = UD_test_mksession(session=list())
#> → UD: including file
#> → UD:   source: file.path(system.file(package="onbrand"), "templates", "report.docx")
#> → UD:   dest:   file.path("config","report.docx")
#> → UD: including file
#> → UD:   source: file.path(system.file(package="onbrand"), "templates", "report.pptx")
#> → UD:   dest:   file.path("config","report.pptx")
#> → UD: including file
#> → UD:   source: file.path(system.file(package="onbrand"), "templates", "report.yaml")
#> → UD:   dest:   file.path("config","report.yaml")
#> → UD: State initialized
#> → UD: module checksum updated:897d952fecbc804999396a96f9df4b20
session = sess_res$session
# This function assumes that some module state exists:
state = UD_init_state(
 FM_yaml_file  = system.file(package = "formods",
                             "templates",
                             "formods.yaml"),
 MOD_yaml_file = system.file(package = "formods",
                             "templates",
                             "UD.yaml"),
 id = "UD",
 session = session)
#> → UD: including file
#> → UD:   source: file.path(system.file(package="onbrand"), "templates", "report.docx")
#> → UD:   dest:   file.path("config","report.docx")
#> → UD: including file
#> → UD:   source: file.path(system.file(package="onbrand"), "templates", "report.pptx")
#> → UD:   dest:   file.path("config","report.pptx")
#> → UD: including file
#> → UD:   source: file.path(system.file(package="onbrand"), "templates", "report.yaml")
#> → UD:   dest:   file.path("config","report.yaml")
#> → UD: State initialized
FM_fetch_log_path(state)
#> [1] "/var/folders/l9/6pm7xq5j1hn6l00zrs22j6mc0000gn/T//Rtmp5FPHh9/non_shiny/FM/formods_log.txt"