function zshlibs_log() { local facility=$1 shift if [[ -n "${@}" ]] then echo "$(date -Ins) ${@}" >> "${HOME}/.log/z_$facility.log" else echo "$(date -Ins) $(cat)" >> "${HOME}/.log/z_$facility.log" fi }