Crate stump

Source

Macros§

debug
Prints messages at the DEBUG (lowest) level. Accepts standard println formatting.
error
Prints messages at the ERROR level. Accepts standard println formatting.
info
Prints messages at the INFO level. Accepts standard println formatting.
status
Generic status print, expects a LogEntryLevel as the first parameter.
status_at_or_above
Prints a status message if the minimum status level is at or above the supplied LogEntryLevel enum (first parameter)
veprintln
Print to stderr if user specified increased output verbosity
vprintln
Print to stdout if user specified increased output verbosity
warn
Prints messages at the WARN level. Accepts standard println formatting.

Enums§

CompleteStatus
Outputs for task completion
LogEntryLevel
Defines the four main logging output levels

Functions§

do_println
Print the string to stdout, or if present, a user-provided print closure.
format_complete
Formats the completion message
format_datetime
Formats the current date and time (now) using either the default data format or one specified in the environment variable STUMP_LOG_DATETIME_FORMAT
format_done
Formats a message and an OK similar to older Linux boot displays
format_fail
Formats a message and a FAIL similar to older Linux boot displays
format_warn
Formats a message and a WARN similar to older Linux boot displays
get_min_log_level
Retrieves the global minimum logging level. Does not check the user env var.
is_verbose
Indicates whether the verbose flag is set
print_complete
Directly prints a completion message, taking in the CompleteStatus enum
print_done
Prints a message and an OK similar to older Linux boot displays
print_experimental
Prints a simple message indicating experimental status of a function.
print_fail
Prints a message and a FAIL similar to older Linux boot displays
print_warn
Prints a message and a WARN similar to older Linux boot displays
set_min_log_level
Sets the global minimum logging level. Can be user-overridden with STUMPLOG_AT_LEVEL
set_print
Provides an alternative print method for integration with other command line options such as informif.
set_verbose
Sets whether the verbose standard print macro prints to stdout or stays silent