ConsoleMessage "message"
Prints a message to the console (standard error).
The function uses CONFIG_MAP["RUNNING_IN"]
to determine which setting to use:
CONFIG_MAP["LOADER_QUIET"]
for the loader,
CONFIG_MAP["SHELL_QUIET"]
for the shell, or
CONFIG_MAP["TASK_QUIET"]
for tasks.
If the setting for quiet is off, it prints the message.
Otherwise it does not print the message.
Arguments | Return |
---|---|
$1: the message |
none |
ConsoleMessage "message"
Returns the message status.
The function uses CONFIG_MAP["RUNNING_IN"]
to determine which setting to use:
CONFIG_MAP["LOADER_QUIET"]
for the loader,
CONFIG_MAP["SHELL_QUIET"]
for the shell, or
CONFIG_MAP["TASK_QUIET"]
for tasks.
Arguments | Return (print) |
---|---|
none |
1 for on, 0 for off |
if ConsoleIsMessage; then …; else …; fi
Returns shell-prompt status from CONFIG_MAP["SHELL_SNP"]
.
The function uses CONFIG_MAP["RUNNING_IN"]
to determine which setting to use:
CONFIG_MAP["LOADER_QUIET"]
for the loader,
CONFIG_MAP["SHELL_QUIET"]
for the shell, or
CONFIG_MAP["TASK_QUIET"]
for tasks.
Arguments | Return (print) |
---|---|
none |
1 for on, 0 for off |
if ConsoleIsPrompt; then …; else …; fi
Prints an error message with [Fatal] tag if the level for fatal is set and increases the error counter.
The function uses CONFIG_MAP["RUNNING_IN"]
to determine which setting to use:
CONFIG_MAP["LOADER_LEVEL"]`and `LOADER_ERRORS
counter for the loader,
CONFIG_MAP["SHELL_LEVEL"]
and SHELL_ERRORS
counter for the shell, or
CONFIG_MAP["TASK_LEVEL"]
and TASK_ERRORS
counter for tasks.
Arguments | Return (print) |
---|---|
$1: message prefix, e.g. script name with colon $2: the error message |
none |
ConsoleFatal " →" "fatal error message"
Prints an error message with [Error] tag if the level for fatal is set and increases the error counter.
The function uses CONFIG_MAP["RUNNING_IN"]
to determine which setting to use:
CONFIG_MAP["LOADER_LEVEL"]
and LOADER_ERRORS
counter for the loader,
CONFIG_MAP["SHELL_LEVEL"]
and SHELL_ERRORS
counter for the shell, or
CONFIG_MAP["TASK_LEVEL"]
and TASK_ERRORS
counter for tasks.
Arguments | Return (print) |
---|---|
$1: message prefix, e.g. script name with colon $2: the error message |
none |
ConsoleError " →" "error message"
Resets the error counter, i.e. sets it to 0.
The function uses CONFIG_MAP["RUNNING_IN"]
to determine which counter to reset:
LOADER_ERRORS
for the loader,
SHELL_ERRORS
for the shell, or
TASK_ERRORS
for tasks.
ConsoleResetErrors
Returns true if the counter has errors (i.e. is larger than 0) or false if it does not have errors (i.e. is 0).
The function uses CONFIG_MAP["RUNNING_IN"]
to determine which counter to use:
LOADER_ERRORS
for the loader,
SHELL_ERRORS
for the shell, or
TASK_ERRORS
for tasks.
Arguments | Return |
---|---|
none |
true (0) if errors false (1) if no errors |
if ConsoleHasErrors; then …; …; fi
if ConsoleHasErrors; then …; else …; fi
Prints a strict warning message.
If the application is not in strict mode, those messages are considered warnings.
Here, the message will be printed with the tag [Warn/Strict] and the warning counter will be increased.
If the application is in strict mode, those messages are considered errors.
Here, the message will be printed with the tag [Error/Strict] and ere, the error counter will be increased.
In ansi print mode, Warn is yellow and Error is red.
The function uses CONFIG_MAP["RUNNING_IN"]
and CONFIG_MAP["STRICT"]
to determine which counter to increase.
Arguments | Return |
---|---|
$1: message prefix, script name with colon $2: the warning/error message |
none |
ConsoleWarnStrict " →" "did not find file $FILE"
Prints a warning message.
The message will be printed with the tag [Warn] and the warning counter will be increased.
If the application is in strict mode, those messages are considered errors.
The function uses CONFIG_MAP["RUNNING_IN"]
to determine which counter to increase:
LOADER_WARNINGS
for the loader,
SHELL_WARNINGS
for the shell, or
TASK_WARNINGS
for tasks.
Arguments | Return |
---|---|
$1: message prefix, script name with colon $2: the warning message |
none |
ConsoleWarn " →" "did not find file $FILE"
Resets the warning counter, i.e. sets it to 0.
The function uses CONFIG_MAP["RUNNING_IN"]
to determine which counter to reset:
LOADER_WARNINGS
for the loader,
SHELL_WARNINGS
for the shell, or
TASK_WARNINGS
for tasks.
ConsoleResetWarnings
Returns true if the counter has warnings (i.e. is larger than 0) or false if it does not have warnings (i.e. is 0).
The function uses CONFIG_MAP["RUNNING_IN"]
to determine which counter to use:
LOADER_WARNINGS
for the loader,
SHELL_WARNINGS
for the shell, or
TASK_WARNINGS
for tasks.
Arguments | Return |
---|---|
none |
true (0) if warnings false (1) if no warnings |
if ConsoleHasWarnings; then …; …; fi
if ConsoleHasWarnings; then …; else …; fi
Prints an information message. The message will be printed with the tag [Info].
Arguments | Return |
---|---|
$1: message prefix, script name with colon $2: the message |
none |
ConsoleInfo " →" "I am doing something now"
Prints a debug message. The message will be printed with the prefix ` >` in bold.
Arguments | Return |
---|---|
$1: the message |
none |
ConsoleDebug "I am doing something now"
Prints a trace message. The message will be printed with the prefix ` >` in italic.
Arguments | Return |
---|---|
$1: the message |
none |
ConsoleTrace "I am doing something now"
Returns the message status.
The function uses CONFIG_MAP["RUNNING_IN"]
to determine which setting to use:
CONFIG_MAP["LOADER_LEVEL"]
for the loader,
CONFIG_MAP["SHELL_LEVEL"]
for the shell, or
CONFIG_MAP["TASK_LEVEL"]
for tasks.
Arguments | Return (print) |
---|---|
none |
1 for on, 0 for off |
if ConsoleIsDebug; then …; else …; fi
Returns the message status.
The function uses CONFIG_MAP["RUNNING_IN"]
to determine which setting to use:
CONFIG_MAP["LOADER_LEVEL"]
for the loader,
CONFIG_MAP["SHELL_LEVEL"]
for the shell, or
CONFIG_MAP["TASK_LEVEL"]
for tasks.
Arguments | Return (print) |
---|---|
none |
1 for on, 0 for off |
if ConsoleIsTrace; then …; else …; fi