Commit 06740201 by Eric Coissac

Add DEBUG level logs on stack operations

parent 14997f20
......@@ -33,6 +33,7 @@ logdebug "Load stacks package"
function newstack() {
logdebug "New stack ${1} created"
eval declare -a "${1}"
}
......@@ -41,6 +42,7 @@ function stacksize() {
}
function pushvalue() {
logdebug "New value pushed on stack ${1}"
p="${1}[$(stacksize ${1})]=\"${2}\""
eval "$p"
}
......@@ -48,6 +50,7 @@ function pushvalue() {
function popvalue() {
local __popvalue_STACK="${1}"
shift
logdebug "New value poped from stack ${__popvalue_STACK}"
if [[ ! -z "${1}" ]]; then
local __popvalue_COMMAND="${1}="
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment