X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/e7aef48f33e934106d1a50201d9f098f9886d7ec..45e43e1fd12c19728d53af61feadb1ab9e8d713f:/.zsh/logging?ds=sidebyside diff --git a/.zsh/logging b/.zsh/logging index ad4c54a..26d7544 100644 --- a/.zsh/logging +++ b/.zsh/logging @@ -15,24 +15,24 @@ __log() { __do_debug() { [ -n "${ZDEBUG:-}" ] } -error() { +zerror() { [[ -o xtrace ]] && set +x && local __XTRACE=1 - __log E "$@" + __log E "$@" [ "${__XTRACE:-}" ] && set -x } -warn() { +zwarn() { [[ -o xtrace ]] && set +x && local __XTRACE=1 - __log W "$@" + __log W "$@" [ "${__XTRACE:-}" ] && set -x } -info() { +zinfo() { [[ -o xtrace ]] && set +x && local __XTRACE=1 - __log I "$@" + __log I "$@" [ "${__XTRACE:-}" ] && set -x } -debug() { +zdebug() { [[ -o xtrace ]] && set +x && local __XTRACE=1 - __do_debug && __log D "$@" + __do_debug && __log D "$@" [ "${__XTRACE:-}" ] && set -x }