$timestamps
If set to true, prefixes stderr with a timestamp.
Default: true
$nanoseconds
If non-empty, timestamps will include nanoseconds.
Default: null
$app_log_hook
Name of function that implements app_log_pipe.
Default: app_log_stub
$error_usage_hook
Name of function that implements error_usage.
Default: error_usage_stub
app_log
Calls app_log_hook
script_log_pipe_stub
timestamp()
Prints a timestamp if $timestamps is true. If $nanoseconds is non-empty, the timestap will include nanoseconds.
_app_echo()
If logging is enabled, pipes the arguments ($@) to the logging function (app_log()); otherwise, this simply echos them.
app_echo()
Prints the arguments ($@), prefixed with timestamp().
app_echo_n()
Same as app_echo() but suppresses the trailing newline.
app_msg()
Prints arguments ($@) with app_echo(), prefixed with the current command namespace.
app_msg_if()
Prints a message with app_msg()
error()
Prints an error message ($*) to stderr and (conditionally) displays a stack trace.
Returns: Always returns false.
warn()
Prints a warning message ($*) to stderr unless $quiet is true.
info()
Prints an information message ($*) to stderr if $verbose is true.
debug()
Prints an debugging message ($*) to stderr if $verbose is true.
error_usage()
Prints an error ($*) and current command usage.
error_usage_stub()
This stub prints an unadorned error; the core/commands library provides a version to print the usage information.
assert()
Calls error() with a message ($1) if a command ($@) does not return success.
assert_usage()
Same as assert() but calls error_usage() instead of error().
stack_raw()
Prints the current stack in its raw form: the built-in variables that describe it.
stack_trace()
Prints the current stack, if $debug is true.