mirror of
https://github.com/hassio-addons/bashio.git
synced 2025-05-06 20:11:24 +00:00
✨ Allow for multiple args on log functions
This commit is contained in:
parent
9ba69c749b
commit
2e04539422
1 changed files with 7 additions and 7 deletions
14
lib/log.sh
14
lib/log.sh
|
@ -14,7 +14,7 @@
|
||||||
# $1 Message to display
|
# $1 Message to display
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
bashio::log() {
|
bashio::log() {
|
||||||
local message=${1}
|
local message=$*
|
||||||
echo -e "${message}" >&2
|
echo -e "${message}" >&2
|
||||||
return "${__BASHIO_EXIT_OK}"
|
return "${__BASHIO_EXIT_OK}"
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ bashio::log() {
|
||||||
# $1 Message to display
|
# $1 Message to display
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
bashio::log.red() {
|
bashio::log.red() {
|
||||||
local message=${1}
|
local message=$*
|
||||||
echo -e "${__BASHIO_COLORS_RED}${message}${__BASHIO_COLORS_RESET}" >&2
|
echo -e "${__BASHIO_COLORS_RED}${message}${__BASHIO_COLORS_RESET}" >&2
|
||||||
return "${__BASHIO_EXIT_OK}"
|
return "${__BASHIO_EXIT_OK}"
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ bashio::log.red() {
|
||||||
# $1 Message to display
|
# $1 Message to display
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
bashio::log.green() {
|
bashio::log.green() {
|
||||||
local message=${1}
|
local message=$*
|
||||||
echo -e "${__BASHIO_COLORS_GREEN}${message}${__BASHIO_COLORS_RESET}" >&2
|
echo -e "${__BASHIO_COLORS_GREEN}${message}${__BASHIO_COLORS_RESET}" >&2
|
||||||
return "${__BASHIO_EXIT_OK}"
|
return "${__BASHIO_EXIT_OK}"
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ bashio::log.green() {
|
||||||
# $1 Message to display
|
# $1 Message to display
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
bashio::log.yellow() {
|
bashio::log.yellow() {
|
||||||
local message=${1}
|
local message=$*
|
||||||
echo -e "${__BASHIO_COLORS_YELLOW}${message}${__BASHIO_COLORS_RESET}" >&2
|
echo -e "${__BASHIO_COLORS_YELLOW}${message}${__BASHIO_COLORS_RESET}" >&2
|
||||||
return "${__BASHIO_EXIT_OK}"
|
return "${__BASHIO_EXIT_OK}"
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ bashio::log.yellow() {
|
||||||
# $1 Message to display
|
# $1 Message to display
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
bashio::log.blue() {
|
bashio::log.blue() {
|
||||||
local message=${1}
|
local message=$*
|
||||||
echo -e "${__BASHIO_COLORS_BLUE}${message}${__BASHIO_COLORS_RESET}" >&2
|
echo -e "${__BASHIO_COLORS_BLUE}${message}${__BASHIO_COLORS_RESET}" >&2
|
||||||
return "${__BASHIO_EXIT_OK}"
|
return "${__BASHIO_EXIT_OK}"
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ bashio::log.blue() {
|
||||||
# $1 Message to display
|
# $1 Message to display
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
bashio::log.magenta() {
|
bashio::log.magenta() {
|
||||||
local message=${1}
|
local message=$*
|
||||||
echo -e "${__BASHIO_COLORS_MAGENTA}${message}${__BASHIO_COLORS_RESET}" >&2
|
echo -e "${__BASHIO_COLORS_MAGENTA}${message}${__BASHIO_COLORS_RESET}" >&2
|
||||||
return "${__BASHIO_EXIT_OK}"
|
return "${__BASHIO_EXIT_OK}"
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ bashio::log.magenta() {
|
||||||
# $1 Message to display
|
# $1 Message to display
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
bashio::log.cyan() {
|
bashio::log.cyan() {
|
||||||
local message=${1}
|
local message=$*
|
||||||
echo -e "${__BASHIO_COLORS_CYAN}${message}${__BASHIO_COLORS_RESET}" >&2
|
echo -e "${__BASHIO_COLORS_CYAN}${message}${__BASHIO_COLORS_RESET}" >&2
|
||||||
return "${__BASHIO_EXIT_OK}"
|
return "${__BASHIO_EXIT_OK}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue