Add the supplied txt and the module type to the log file and display it to the console.
Arguments
- state
Module state after yaml read
- entry
Text to add
- escape_braces
Set to
TRUE
(default) to escape curly braces in the entry, set toFALSE
to have the values interpreted.- entry_type
Set to either "alert"(default), "danger", "info", "success", or "warning"
Examples
# We need a module state to use this function:
id="UD"
sess_res = UD_test_mksession(session=list(), id=id)
#> → 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
state = sess_res$state
FM_le(state, "This is a normal message")
#> → UD: This is a normal message
#> NULL
FM_le(state, "This is a danger message", entry_type="danger")
#> ✖ UD: This is a danger message
#> NULL
FM_le(state, "This is a info message", entry_type="info")
#> ℹ UD: This is a info message
#> NULL
FM_le(state, "This is a success message", entry_type="success")
#> ✔ UD: This is a success message
#> NULL
FM_le(state, "This is a warning message", entry_type="warning")
#> ! UD: This is a warning message
#> NULL