Article delegate-en/4726 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A4725@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: changing name of stdout.log
14 Jan 2010 10:25:43 GMT Stefan Demmig <poqjabdyi-xgv6ctn54ptr.ml@ml.delegate.org>


Hi Yutaka,

thank's for your fast response. I see your point concerning the aging of stdout.log. As far as I can see in my production system with over 150 users, in fact stdout.log doesn't grow so much, that a daily change seems necessary. But anyway, it is good to be able to move stdout.log to any directory and change the name to what I like. So the parameter STDOUTLOG makes sense. Thank you.

I myself don't expect much help from a prefix parameter. First of all people won't only prefix their logfile names but also postfix them or even more complex things, and then you already have provided the possibility to change any name in detail. These parameters are needed only once to install the system. So I thing it doesn't matter to type 5 parameters instead of 1, but it might matter to keep an additional parameter up to date (code, documentation ...).

I have got another point to discuss. I wonder if I completely understud the EXPIRE process. in my parameter list
---------------------------
-P137.250.203.1:8080
env[28] LIBPATH=.;C:\WINDOWS\system32;e:\DelegateData/lib;C:\delegate;e:\DelegateData/etc
arg[1] LIBPATH=.;C:\delegate;e:\DelegateData/lib;delegated;e:\DelegateData/etc
arg[2] RESOLV=cache,file,dns,sys
arg[3] SERVER=http
arg[4] ADMIN=sysop@uni-augsburg..de
arg[5] DGROOT=e:\DelegateData
arg[6] PERMIT=*:*:137.250.0.0/255.255.0.0
arg[7] CONNECT=c,d:*:*:*
arg[8] CACHE=do
arg[9] CACHEDIR=F:\DelegateCache
arg[10] EXPIRE=1d:*:*:*
arg[11] CRON=30 0 * * 1-5 -expire 30d
arg[12] LOGFILE=${LOGDIR}/[date+%Y%m%d-%H]_${PORT}.log
arg[13] PROTOLOG=${LOGDIR}/[date+%Y%m%d]_${PORT}.${PROTO}.log
arg[14] EXPIRELOG=${LOGDIR}/[date+%Y%m%d]_expire.log
arg[15] ERRORLOG=${LOGDIR}/[date+%Y%m%d]_errors.log
arg[16] TRACELOG=${LOGDIR}/[date+%Y%m%d]_trace.log
----------------------------
I wanted the system to expire files after 1 day and to delete expired files after 30 days so that after 31 days of no trafic the cache would be empty again. Is the parameter pair 10 + 11 correct and will it work under Windows? What happens, if a file on a web server changes before 1 day. Will I receive the cached file or will it be reloaded from the original server, since it changed? If I normally receive the cached version of the file, I should keep the cache period as small as possible. There might exist a mechanism which checks if the cached file is still up to date (some time&date data from the original server) and if not so reloads the file. The cached file will be removed if not accessed by any client for a certain period of time e.g. 1 month.

Thank you for your friendly help.

Best regards

Stefan Demmig
Systembetreuer Windows

Universität Augsburg
Zentralverwaltung, Referat IV/4
Universitätstr. 2
D-86159 Augsburg

Präsidiumsgebäude, Zimmer 3072

phone: +49 000 000 000f
fax: +49 000 000 000f
email: poqjabdyi-xgv6ctn54ptr.ml@ml.delegate.org
ICQ: 355004633
Skype: stefan-demmig

Am 14.01.2010 04:40, schrieb Yutaka Sato:
> Hi Stefan,
>
> In message<_A4724@delegate-en.ML_>  on 01/12/10(19:47:02)
> you Stefan Demmig<poqjabdyi-xgv6ctn54ptr.ml@ml.delegate.org>  wrote:
>   |first of all, thank you very much for your great program delegated. It's a real help.
>   |I installed delegate 9.9.6 under Windows 2003 32 bit.
>   |
>   |While trying to introduce aging into my logfile names I missed a parameter for stdout.log like STDOUT='${LOGDIR}/stdout.log'. Did I miss something or can't I change the name of this logfile? I would like to change it to something likeSTDOUT='${LOGDIR}/[date+%y%m%d]_stdout.log'
>
> I thought my answer should be "Yes, we can" but I found that the file
> name is fixed to "stdout.log" or implicitly "${LOGDIR}/stdout.log" in
> the function setSTDLOG() in "src/delegated.c".
> So I added a new parameter "STDOUTLOG=..." in DeleGate/9.9.7-pre21 and
> uploaded it at ftp://ftp.delegate.org/pub/DeleGate/tmp/bin-latest9/
> Please give it a try.
>
> By the way, I'm reminded a problem of "stdout.log" aging since it is a
> file to get raw output (stdout and stderr) not only from DeleGate but also
> from child processes of DeleGate (including that from CGI or CFI commands).
> It is not managed log output via a logging functions as other log-files,
> but raw and unmanaged output (without a time stamp) to stdout and stderr
> (which might show fatal errors) simply redirected to this file (and
> inherited to child processes as stdout/stderr as opened file handles).
> Thus it is difficult to switch the output (from children) strictly timely
> following to the aging by "[date+format]" in LOGDIR or LOGFILE.
> (gathering them again via pipe() or such and record it (with time stamp)
> might be a solution ...)
>
> Another problem specific to Windows version is that when DeleGate runs
> on Windows as a service, it is invoked without effective standard-IO
> (stdin,stdout and stderr of which fileno() value is -2).
> Because of it, the stdout/stderr of main process of DeleGate service
> have not been recorded into stdout.log.
> I fixed it in this time too.
>
>   |I would like to change it to something likeSTDOUT='${LOGDIR}/[date+%y%m%d]_stdout.log'
>
> Maybe you intend to give an unique name for all log files (LOGFILE,
> PROTOLOG, ERRLOG, ...}.  I think it will be useful if we have a way to
> specify a log file name pattern applied to all log files as
>    LOGFILEPREFIX="[date+%y%m%d]_"
> or
>    LOGFILENAME="[date+%y%m%d]_${LOGNAME}"
> ...
>
> Cheers,
> Yutaka
> --
>    9 9   Yutaka Sato<y.sato@delegate.org>  http://delegate.org/y.sato/
>   ( ~ )  National Institute of Advanced Industrial Science and Technology
> _<    >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
> Do the more with the less -- B. Fuller

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V