mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-20 13:24:24 -07:00
improved logging function
This commit is contained in:
parent
4f14d41779
commit
7bf46685a0
1 changed files with 5 additions and 7 deletions
|
@ -6,9 +6,8 @@ log_event() {
|
||||||
|
|
||||||
# Checking logging system
|
# Checking logging system
|
||||||
if [ "$LOG_SYSTEM" = 'yes' ]; then
|
if [ "$LOG_SYSTEM" = 'yes' ]; then
|
||||||
# Checking logging level
|
log=$(echo "$LOG_LEVEL" | grep -w "$level" )
|
||||||
log=$(echo "$LOG_LEVEL" | cut -f 2 -d \' | grep -w "$level" )
|
if [ -n "$log" ]; then
|
||||||
if [ ! -z "$log" ]; then
|
|
||||||
echo "$event" >> $V_LOG/$level.log
|
echo "$event" >> $V_LOG/$level.log
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -27,7 +26,6 @@ log_history() {
|
||||||
|
|
||||||
# Argument list checker
|
# Argument list checker
|
||||||
check_args() {
|
check_args() {
|
||||||
|
|
||||||
sys_args="$1"
|
sys_args="$1"
|
||||||
user_args="$2"
|
user_args="$2"
|
||||||
usage="$3"
|
usage="$3"
|
||||||
|
@ -368,9 +366,9 @@ is_system_enabled() {
|
||||||
}
|
}
|
||||||
|
|
||||||
proxy_function() {
|
proxy_function() {
|
||||||
if [ "$PROXY_SYSTEM" != 'nginx' ]; then # only nginx
|
if [ "$PROXY_SYSTEM" != 'nginx' ]; then
|
||||||
echo "Error: proxy hosting support disabled" # support for
|
echo "Error: proxy hosting support disabled"
|
||||||
log_event 'debug' "$E_DISABLED $V_EVENT" # now
|
log_event 'debug' "$E_DISABLED $V_EVENT"
|
||||||
exit $E_DISABLED
|
exit $E_DISABLED
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue