Browse Source

feat: custom log level

master
dnomd343 3 years ago
parent
commit
668548bb0a
  1. 10
      load.sh

10
load.sh

@ -83,10 +83,18 @@ EOF
} }
load_log(){ load_log(){
log_level=`cat $LOG_DIR/level`
legal=false
[ "$log_level" == "debug" ] && legal=true
[ "$log_level" == "info" ] && legal=true
[ "$log_level" == "warning" ] && legal=true
[ "$log_level" == "error" ] && legal=true
[ "$log_level" == "none" ] && legal=true
[ "$legal" == false ] && log_level="warning"
cat>$XRAY_DIR/conf/log.json<<EOF cat>$XRAY_DIR/conf/log.json<<EOF
{ {
"log": { "log": {
"loglevel": "warning", "loglevel": "$log_level",
"access": "$LOG_DIR/access.log", "access": "$LOG_DIR/access.log",
"error": "$LOG_DIR/error.log" "error": "$LOG_DIR/error.log"
} }

Loading…
Cancel
Save