New feature: Dev debug

I useful feature for developers.

This will enable a log to be created of everything that ran when
executing a command. It uses the set command.

When you run a command a file dev-debug.log is created and will output
set -x
This commit is contained in:
Daniel Gibbs 2015-12-20 21:22:56 +00:00
parent b1e31126bf
commit 35be754990
45 changed files with 285 additions and 1 deletions

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -4,6 +4,12 @@
# Author: Daniel Gibbs
# Contributor: Scarsz
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -4,6 +4,12 @@
# Author: Daniel Gibbs
# Contributor: Summit Singh Thakur
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -4,6 +4,12 @@
# Author: Daniel Gibbs
# Contributions: Bryce Van Dyk (SingingTree)
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="121215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -4,6 +4,12 @@
# Author: Daniel Gibbs
# Contributor: Bryce Van Dyk (SingingTree)
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -4,6 +4,12 @@
# Author: Daniel Gibbs
# Contributor: Bryce Van Dyk (SingingTree)
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="201215"
#### Variables ####

View File

@ -3,6 +3,12 @@
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="121215"
#### Variables ####

13
functions/fn_debug_dev Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
# LGSM fn_debug_dev function
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
lgsm_version="061115"
if [ -f ".dev-debug" ]; then
rm .dev-debug
fn_printoknl "Disabled dev-debug"
else
date > .dev-debug
fn_printoknl "Enabled dev-debug"
fi

View File

@ -2,7 +2,7 @@
# LGSM fn_functions function
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
lgsm_version="061115"
lgsm_version="201215"
# Description: Defines all functions to allow download and execution of functions using fn_runfunction.
# This function is called first before any other function. Without this file other functions would not load.
@ -102,6 +102,11 @@ functionfile="${FUNCNAME}"
fn_runfunction
}
fn_debug_dev(){
functionfile="${FUNCNAME}"
fn_runfunction
}
fn_deps_detect(){
functionfile="${FUNCNAME}"
fn_runfunction

View File

@ -35,6 +35,8 @@ case "$getopt" in
fn_console;;
d|debug)
fn_debug;;
dev|dev-debug)
fn_debug_dev;;
i|install)
fn_install;;
ai|auto-install)
@ -88,6 +90,8 @@ case "$getopt" in
fn_details;;
b|backup)
fn_backup;;
dev|dev-debug)
fn_debug_dev;;
i|install)
fn_install;;
ai|auto-install)
@ -133,6 +137,8 @@ case "$getopt" in
fn_email_test;;
b|backup)
fn_backup;;
dev|dev-debug)
fn_debug_dev;;
console)
fn_console;;
d|debug)
@ -189,6 +195,8 @@ case "$getopt" in
fn_console;;
d|debug)
fn_debug;;
dev|dev-debug)
fn_debug_dev;;
i|install)
fn_install;;
ai|auto-install)
@ -247,6 +255,8 @@ case "$getopt" in
fn_console;;
d|debug)
fn_debug;;
dev|dev-debug)
fn_debug_dev;;
i|install)
fn_install;;
mc|map-compressor)
@ -307,6 +317,8 @@ case "$getopt" in
fn_console;;
d|debug)
fn_debug;;
dev|dev-debug)
fn_debug_dev;;
i|install)
fn_install;;
ai|auto-install)
@ -366,6 +378,8 @@ case "$getopt" in
fn_console;;
d|debug)
fn_debug;;
dev|dev-debug)
fn_debug_dev;;
i|install)
fn_install;;
mc|map-compressor)