From beeeff2955e67c24776036bf356f661477578bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Sun, 25 Oct 2020 11:24:45 +0100 Subject: [PATCH] changed submodules Vundle --- bin/testlog | 47 +++++++++++++++++++++++++++++++++++++++++++ vim/bundle/Vundle.vim | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100755 bin/testlog diff --git a/bin/testlog b/bin/testlog new file mode 100755 index 0000000..24a9c89 --- /dev/null +++ b/bin/testlog @@ -0,0 +1,47 @@ +#!/bin/bash + +LANG=C +for f in logerror logwarn loginfo logdebug logtrace ENTRY EXIT SCRIPTENTRY SCRIPTEXIT; do + if LANG=C type -t $f 2> /dev/null| grep -q 'function'; then + : + else + fx=${f//log/} + #echo "create function $f for $fx" + eval "$f () { \ + local loglevels; \ + declare -a loglevels; \ + case $fx in + error) + loglevels=() + ;; + warn) + loglevels=(\"ERROR\") + ;; + info) + loglevels=(\"ERROR\" \"WARN\" ) + ;; + debug) + loglevels=( \"ERROR\" \"WARN\" \"INFO\" ) + ;; + trace|ENTRY|EXIT|SCRIPTENTRY|SCRIPTEXIT) + loglevels=( \"ERROR\" \"WARN\" \"INFO\" \"DEBUG\" ) + ;; + esac + if [[ ! \${loglevels[*]} =~ \"\${LOGLEVEL-\${LOGLEVEL_DEFAULT}}\" ]];then \ + echo "\$@" >&2 + fi; \ + }" + unset fx + fi +done +unset f + +logerror "ich bin ein error" +logwarn "ich bin eine warnung" +loginfo "ich bin eine info" +logdebug "ich bin eine debuginfo" +logtrace "ich rede zuviel" +ENTRY "ich starte eine function" +EXIT "ich beende eine function" +SCRIPTENTRY "ich starte ein script" +SCRIPTEXIT "ich beende ein script" diff --git a/vim/bundle/Vundle.vim b/vim/bundle/Vundle.vim index 9a38216..b255382 160000 --- a/vim/bundle/Vundle.vim +++ b/vim/bundle/Vundle.vim @@ -1 +1 @@ -Subproject commit 9a38216a1c0c597f978d73547d37681fc689c90d +Subproject commit b255382d6242d7ea3877bf059d2934125e0c4d95