Learn R Programming

formods (version 0.2.1)

FM_le: Adds Message to Log File and Displays it to the Console

Description

Add the supplied txt and the module type to the log file and display it to the console.

Usage

FM_le(state, entry, escape_braces = TRUE, entry_type = "alert")

Value

Boolean value indicating success (TRUE) or failure (FALSE).

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 to FALSE to have the values interpreted.

entry_type

Set to either "alert"(default), "danger", "info", "success", or "warning"

Examples

Run this code
# We need a module state to use this function:
sess_res = UD_test_mksession()
state   = sess_res$state
FM_le(state, "This is a normal  message")
FM_le(state, "This is a danger  message", entry_type="danger")
FM_le(state, "This is a info    message", entry_type="info")
FM_le(state, "This is a success message", entry_type="success")
FM_le(state, "This is a warning message", entry_type="warning")

Run the code above in your browser using DataLab