X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/e7aef48f33e934106d1a50201d9f098f9886d7ec..e45b0db3d66ca9e041622db3d801d026fb4d3724:/.zsh/logging diff --git a/.zsh/logging b/.zsh/logging index ad4c54a..65c9532 100644 --- a/.zsh/logging +++ b/.zsh/logging @@ -2,10 +2,10 @@ # # Logging abilities for the shell initialisation scripts # -# Copyright © 1994–2008 martin f. krafft +# Copyright © 1994–2017 martin f. krafft # Released under the terms of the Artistic Licence 2.0 # -# Source repository: git://git.madduck.net/etc/zsh.git +# Source repository: http://git.madduck.net/v/etc/zsh.git # __log() { @@ -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 }