s4

changeset 699:b33d6e7730ac

Remove some debug output and include timestamp in err()
author HIROSE Yuuji <yuuji@gentei.org>
date Fri, 22 May 2020 07:46:09 +0900
parents b036a06cad90
children f2971e549199
files s4-funcs.sh
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line diff
     1.1 --- a/s4-funcs.sh	Thu May 21 23:35:27 2020 +0900
     1.2 +++ b/s4-funcs.sh	Fri May 22 07:46:09 2020 +0900
     1.3 @@ -673,9 +673,8 @@
     1.4    # err GETPAR=$1, _user=$_user
     1.5    val=""
     1.6    case "$1" in	# Dirty cache mechanism for high-load average
     1.7 -    user)	val=$_user
     1.8 -		err GETPAR____USER=$val;;
     1.9 -    skey)	val=$_skey; err SKEY=$val ;;
    1.10 +    user)	val=$_user ;;
    1.11 +    skey)	val=$_skey ;;
    1.12    esac
    1.13    val=${val:-`query "select val from par where var='$1' and sessid='$session' $2;"`}
    1.14  ## err getpar/val1: "val=[$val]"
    1.15 @@ -702,7 +701,6 @@
    1.16    # $1=sesskey, $user=LoginUserName
    1.17    test -z "$1" && return 1
    1.18    rowid=`query "SELECT rowid FROM $sesstb WHERE user='$user' AND skey = '$1';"` || return 2
    1.19 -  err CHKskey:rowid=$rowid
    1.20    if [ -n "$rowid" ]; then
    1.21       query "UPDATE $sesstb SET expire=datetime('now', 'localtime', '$timeout') WHERE rowid=$rowid;"	# Errors can be ignored
    1.22       return 0
    1.23 @@ -827,7 +825,7 @@
    1.24  	   ###vcount=`sq $db "select count(val) from $cond"`
    1.25  	   # Reset val to store filenames if type is string
    1.26  	   val=`query "select val from $cond and type like 'file:%' order by rowid;"`
    1.27 -err gvb1-sql: "select count(val) from $cond;"
    1.28 +## err gvb1-sql: "select count(val) from $cond;"
    1.29  	   vcount=`query "select count(val) from $cond;"`
    1.30  	   echo $vcount > $td/$c.count
    1.31  	   i=0
    1.32 @@ -836,7 +834,7 @@
    1.33  	     slice="order by rowid limit 1 offset $i"
    1.34  	     i=$((i+1))
    1.35  	     fn=$c.$i
    1.36 -err td=$td, fn=$fn, type=$type, val="[$val]"
    1.37 +## err td=$td, fn=$fn, type=$type, val="[$val]"
    1.38  	     case $type in
    1.39  	       file:*)
    1.40  		 #file=$td/$val
    1.41 @@ -1390,7 +1388,7 @@
    1.42  # trap cleanup INT HUP
    1.43  
    1.44  err() {
    1.45 -  echo "$@" 1>&3
    1.46 +  echo "[`date +%F-%T%z`] $@" 1>&3
    1.47  }
    1.48  
    1.49  cgiinit() {