s4
changeset 885:4c02a9f862d7
Prefix process id in all log entries
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Thu, 17 Dec 2020 07:36:56 +0900 |
parents | 4e755437dbcb |
children | 99187e4ad69b |
files | s4-blog.sh s4-funcs.sh s4-world.sh |
diffstat | 3 files changed, 7 insertions(+), 7 deletions(-) [+] |
line diff
1.1 --- a/s4-blog.sh Thu Dec 17 07:34:51 2020 +0900 1.2 +++ b/s4-blog.sh Thu Dec 17 07:36:56 2020 +0900 1.3 @@ -1402,7 +1402,7 @@ 1.4 echo "日記番号指定が無効です。" | html p 1.5 return 1.6 fi 1.7 - err "blog_reply($$) Started: `gdate +%S.%03N` blogrowid=$rowid" 1.8 + err "blog_reply Started: `gdate +%S.%03N` blogrowid=$rowid" 1.9 blog_writable $rowid $user; rc=$? 1.10 if [ $rc = 0 ]; then 1.11 iswritable=true 1.12 @@ -1445,7 +1445,7 @@ 1.13 ## END: 1.14 par2table $formdir/article.def 1.15 st=$? 1.16 - err "blog_reply($$): POSTdone `gdate +%S.%03N` - st=$st title=$title owner=$owner user=$user, blogid=$blogid" 1.17 + err "blog_reply: POSTdone `gdate +%S.%03N` - st=$st title=$title owner=$owner user=$user, blogid=$blogid" 1.18 case $st in 1.19 0|4) 1.20 [ "$st" = "4" ] && act="書込削除" 1.21 @@ -1477,7 +1477,7 @@ 1.22 -D_FORM_='' \ 1.23 -D_DUMPTABLE_="syscmd(cat)" -D_DUMPHEAD_="" \ 1.24 $layout/html.m4.html $layout/form+dump-whead.m4.html 1.25 - err "blog_reply($$) Finished: `gdate +%S.%03N` user=$user owner=[$owner] title=[$title]" 1.26 + err "blog_reply Finished: `gdate +%S.%03N` user=$user owner=[$owner] title=[$title]" 1.27 } 1.28 1.29 blog_reply_article() { # Direct link to article in some blog
2.1 --- a/s4-funcs.sh Thu Dec 17 07:34:51 2020 +0900 2.2 +++ b/s4-funcs.sh Thu Dec 17 07:36:56 2020 +0900 2.3 @@ -88,7 +88,7 @@ 2.4 iconcachekey="profimgcache_S" 2.5 2.6 # Start debug logging 2.7 -logtag="${S4WORLD:+{$S4WORLD\}}" 2.8 +logtag="[$$]${S4WORLD:+{$S4WORLD\}}" 2.9 exec 3>> $logdir/debug.out 2.10 err() { 2.11 echo "[`date +%F-%T%z`]$logtag $@" 1>&3
3.1 --- a/s4-world.sh Thu Dec 17 07:34:51 2020 +0900 3.2 +++ b/s4-world.sh Thu Dec 17 07:36:56 2020 +0900 3.3 @@ -77,7 +77,7 @@ 3.4 return -4 3.5 fi 3.6 fi 3.7 - err "`gdate +%S.%3N` Starting account synchronization[$$]" 3.8 + err "`gdate +%S.%3N` Starting account synchronization" 3.9 3.10 prevsync=`tail -1 $syncflag|colrm 20` # 2020-06-21 12:30:00 = 19cols 3.11 syncall=${db%.*}.syncall 3.12 @@ -139,10 +139,10 @@ 3.13 EOF 3.14 ) 3.15 if [ -n "$num" -a "$num" -eq 0 ]; then 3.16 - err "`gdate +%S.%3N` Account synchronization[$$] done in difference $num" 3.17 + err "`gdate +%S.%3N` Account synchronization done in difference $num" 3.18 echo "`date '+%F %T'`: Sync done by process $$" >> $syncflag 3.19 else 3.20 - err "Account synch[$$] failed or bailed with num=[$num]" 3.21 + err "Account synch failed or bailed with num=[$num]" 3.22 fi 3.23 return $num 3.24 }