distillery v2.1.1 Distillery.Releases.Shell View Source
This module provides conveniences for writing output to the shell.
Link to this section Summary
Functions
Wraps a message in the given color
Configure the logging verbosity of the release logger.
Ask the user to confirm an action using the given message. The confirmation prompt will default to "[Yn]: ", and the regex for determining whether the action was confirmed will default to "^(y(es)?)?$".
Same as confirm/1, but takes a custom prompt and answer regex pattern. If the pattern matches the response, the action is considered confirmed.
Write an debug message to standard out.
Write a debug level message, but with minimal formatting. Default color is same as debug level
Write an error message to standard out.
Prints an error message, then terminates the VM with a non-zero status code
Write an info message to standard out.
Print a message formatted with the default formatting for the given log level
Write an notice message to standard out.
Write an success message to standard out.
Returns the current verbosity setting
Write an warn message to standard out.
Write the given iodata directly, bypassing the log level
Write the given iodata, wrapped in the given color, but bypassing the log level
Link to this section Types
verbosity()
View Source
verbosity() :: :silent | :quiet | :normal | :verbose
verbosity() :: :silent | :quiet | :normal | :verbose
Link to this section Functions
colorf(message, color) View Source
Wraps a message in the given color
configure(verbosity)
View Source
configure(verbosity()) :: :ok
configure(verbosity()) :: :ok
Configure the logging verbosity of the release logger.
Valid verbosity settings are:
* `:silent` - no output except errors
* `:quiet` - no output except warnings/errors
* `:normal` - no debug output (default)
* `:verbose` - all output
confirm?(message) View Source
Ask the user to confirm an action using the given message. The confirmation prompt will default to "[Yn]: ", and the regex for determining whether the action was confirmed will default to "^(y(es)?)?$".
Use confirm/3 to provide your own prompt and answer regex.
confirm?(message, prompt, answer_pattern) View Source
Same as confirm/1, but takes a custom prompt and answer regex pattern. If the pattern matches the response, the action is considered confirmed.
debug(message) View Source
Write an debug message to standard out.
debugf(message, color \\ :cyan) View Source
Write a debug level message, but with minimal formatting. Default color is same as debug level
error(message) View Source
Write an error message to standard out.
fail!(message) View Source
Prints an error message, then terminates the VM with a non-zero status code
info(message) View Source
Write an info message to standard out.
levelf(level, message) View Source
Print a message formatted with the default formatting for the given log level
notice(message) View Source
Write an notice message to standard out.
success(message) View Source
Write an success message to standard out.
verbosity() View Source
Returns the current verbosity setting
warn(message) View Source
Write an warn message to standard out.
write(message) View Source
Write the given iodata directly, bypassing the log level
writef(message, color) View Source
Write the given iodata, wrapped in the given color, but bypassing the log level