From 8b7e5ea3521972629d28b40db92c30ce91ffd314 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 4 Oct 2006 13:21:33 +0000 Subject: [PATCH] More info on strftime(3) log file substitutions. --- doc/yaz-log-man.xml | 57 ++++++++++++++++++++++++++++++++++++++++++------- doc/yaz-ztest-man.xml | 9 ++++++-- 2 files changed, 56 insertions(+), 10 deletions(-) diff --git a/doc/yaz-log-man.xml b/doc/yaz-log-man.xml index fdfd93d..661c4bf 100644 --- a/doc/yaz-log-man.xml +++ b/doc/yaz-log-man.xml @@ -8,7 +8,7 @@ %common; ]> - + YAZ @@ -48,14 +48,25 @@ -l logfile - + + Specify the file where the log is to be written. If none is specified, stderr is used. The log is appended to this file. If the file grows overly large, it is silently rotated: It is renamed to - logfile.1 (old such file is deleted), and a + logfile.1, + logfile.2, .., 9 + (old such file is deleted), and a new file is opened. The limit defaults to 1GB, but can be set by the program. - + The rotating limit can be specified with option -r + for the YAZ frontend server (yaz-ztest). + + + Rotation can also be implicitly enabled by using a filename + which gets changed for a given date, due to substitutions as + given by the strftime(3) function. + + @@ -167,9 +178,9 @@ in addition to these. As they depend on the server in question, they can not be described here. See above how to find out about them. - + - EXAMPLES + LOGGING EXAMPLES See what log levels yaz-ztest is using: @@ -223,6 +234,19 @@ + LOG FILENAME EXAMPLES + + A file with format my_YYYYMMDD.log is where Y, M, D is year, month, and day + digits is given as follows + -l my_%Y%m%d.log . And since the filename + is depending on day, rotaion will occur on midnight. + + + A weekly log could be specified as + -l my_%Y%U.log. + + + FILES prefix/include/yaz/log.h @@ -231,8 +255,25 @@ SEE ALSO - yaz(7) - yaz-ztest(8) yaz-client(1) + + yaz + 7 + + + + yaz-ztest + 8 + + + + yaz-client + 1 + + + + strftime + 3 + diff --git a/doc/yaz-ztest-man.xml b/doc/yaz-ztest-man.xml index 757c4a4..52595f3 100644 --- a/doc/yaz-ztest-man.xml +++ b/doc/yaz-ztest-man.xml @@ -10,7 +10,7 @@ ]> - + YAZ @@ -73,7 +73,12 @@ yaz - 7 + 7 + + + yaz-log + 7 + Section "Generic server" in the YAZ manual. -- 1.7.10.4