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 wrap: on
line diff
--- a/s4-funcs.sh	Thu May 21 23:35:27 2020 +0900
+++ b/s4-funcs.sh	Fri May 22 07:46:09 2020 +0900
@@ -673,9 +673,8 @@
   # err GETPAR=$1, _user=$_user
   val=""
   case "$1" in	# Dirty cache mechanism for high-load average
-    user)	val=$_user
-		err GETPAR____USER=$val;;
-    skey)	val=$_skey; err SKEY=$val ;;
+    user)	val=$_user ;;
+    skey)	val=$_skey ;;
   esac
   val=${val:-`query "select val from par where var='$1' and sessid='$session' $2;"`}
 ## err getpar/val1: "val=[$val]"
@@ -702,7 +701,6 @@
   # $1=sesskey, $user=LoginUserName
   test -z "$1" && return 1
   rowid=`query "SELECT rowid FROM $sesstb WHERE user='$user' AND skey = '$1';"` || return 2
-  err CHKskey:rowid=$rowid
   if [ -n "$rowid" ]; then
      query "UPDATE $sesstb SET expire=datetime('now', 'localtime', '$timeout') WHERE rowid=$rowid;"	# Errors can be ignored
      return 0
@@ -827,7 +825,7 @@
 	   ###vcount=`sq $db "select count(val) from $cond"`
 	   # Reset val to store filenames if type is string
 	   val=`query "select val from $cond and type like 'file:%' order by rowid;"`
-err gvb1-sql: "select count(val) from $cond;"
+## err gvb1-sql: "select count(val) from $cond;"
 	   vcount=`query "select count(val) from $cond;"`
 	   echo $vcount > $td/$c.count
 	   i=0
@@ -836,7 +834,7 @@
 	     slice="order by rowid limit 1 offset $i"
 	     i=$((i+1))
 	     fn=$c.$i
-err td=$td, fn=$fn, type=$type, val="[$val]"
+## err td=$td, fn=$fn, type=$type, val="[$val]"
 	     case $type in
 	       file:*)
 		 #file=$td/$val
@@ -1390,7 +1388,7 @@
 # trap cleanup INT HUP
 
 err() {
-  echo "$@" 1>&3
+  echo "[`date +%F-%T%z`] $@" 1>&3
 }
 
 cgiinit() {

yatex.org