echo_msg: Echo message

Description Usage Arguments Value Author(s) Examples

Description

This method displays or writes the message based on debug level. The filehandler is provided through environment variable 'log_fn', and the outputs are written to the file. This method will display message or a hash array based on debug level ('d_level'). If 'd_level' is set to '0', no message or array will be displayed. If 'd_level' is set to '2', it will only display the message level (lvl) is less than or equal to '2'. If you call this method without providing a message level, the message level (lvl) is default to '0'. Of course, if no message is provided to the method, it will be quietly returned. If 'd_level' is set to '1', all the messages with default message level, i.e., 0, and '1' will be displayed. The higher level messages will not be displayed.

Usage

1
echo_msg(prg, step, msg, lvl = 0, fn = NULL)

Arguments

prg

program name calling from

step

step in the program

msg

the message to be displayed. No newline is needed in the end of the message. It will add the newline code at the end of the message.

lvl

the message level is assigned to the message. If it is higher than the debug level, then the message will not be displayed.

fn

log file name

Value

message

Author(s)

Hanming Tu

Examples

1
  NULL;

phuse documentation built on March 26, 2020, 6:31 p.m.