Skip to content

Commit

Permalink
feat: dev-debug.log moved to /data/log if running in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Oct 28, 2023
1 parent 35a535b commit cfdfcc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lgsm/modules/core_exit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ fn_exit_dev_debug() {
echo -e "${moduleselfname} exiting with code: ${exitcode}"
if [ -f "${rootdir}/dev-debug.log" ]; then
grep -a "modulefile=" "${rootdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log"
elif [ -f "${lgsmlogdir}/dev-debug.log" ]; then
grep -a "modulefile=" "${lgsmlogdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log"
fi
fi
}
Expand Down
6 changes: 5 additions & 1 deletion linuxgsm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@

# Debugging
if [ -f ".dev-debug" ]; then
exec 5> dev-debug.log
if [ -f /.dockerenv ]; then
exec 5> /data/log/dev-debug.log
else
exec 5> dev-debug.log
fi
BASH_XTRACEFD="5"
set -x
fi
Expand Down

0 comments on commit cfdfcc3

Please sign in to comment.