feat: dev-debug.log moved to /data/log if running in docker

This commit is contained in:
Daniel Gibbs 2023-10-28 12:59:49 +01:00
parent 35a535bfa1
commit cfdfcc3d7f
No known key found for this signature in database
GPG Key ID: 2076B128385E8C55
2 changed files with 7 additions and 1 deletions

View File

@ -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
}

View File

@ -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