You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
316 B
12 lines
316 B
_HDR_FMT="%.23s %s[%s]: "
|
|
_ERR_MSG_FMT="ERROR: ${_HDR_FMT}%s\n"
|
|
_INFO_MSG_FMT="INFO: ${_HDR_FMT}%s\n"
|
|
|
|
error_msg() {
|
|
printf "$_ERR_MSG_FMT" $(date +%F.%T.%N) ${BASH_SOURCE[1]##*/} ${BASH_LINENO[0]} "${@}"
|
|
}
|
|
|
|
info_msg() {
|
|
printf "$_INFO_MSG_FMT" $(date +%F.%T.%N) ${BASH_SOURCE[1]##*/} ${BASH_LINENO[0]} "${@}"
|
|
}
|