Re: log_filename_prefix --> log_filename + strftime()
От | Ed L. |
---|---|
Тема | Re: log_filename_prefix --> log_filename + strftime() |
Дата | |
Msg-id | 200408271308.36954.pgsql@bluepolka.net обсуждение исходный текст |
Ответ на | Re: log_filename_prefix --> log_filename + strftime() (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: log_filename_prefix --> log_filename + strftime()
|
Список | pgsql-patches |
On Friday August 27 2004 1:03, Tom Lane wrote: > "Ed L." <pgsql@bluepolka.net> writes: > > On Friday August 27 2004 12:41, Tom Lane wrote: > >> BTW, as long as we are taking Apache as the de facto standard --- does > >> the default of "postgresql-%Y-%m-%d_%H%M%S.log" actually make sense, > >> or would something different be closer to the common practice with > >> Apache? > > > > I should say, Apache rotatelogs takes a configurable filename and then > > appends ".N" where N is the logfile start time epoch. In one case, its > > access_log.N, in another its error_log.N. > > Hmm ... there isn't any way to emulate that with strftime escapes, > unless I missed the right one. If you supply an escape, Apache will override that default epoch. So I could see setting the default to "server_log" or "postgresql_log" or whatever, and making the default (with no escapes supplied) be the epoch. That would be easy tweak, and be much closer to Apache style. Ed Apache 1.3.31: if (use_strftime) { struct tm *tm_now; tm_now = gmtime(&tLogStart); strftime(buf2, sizeof(buf2), szLogRoot, tm_now); } else { sprintf(buf2, "%s.%010d", szLogRoot, (int) tLogStart); }
В списке pgsql-patches по дате отправления: