X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=doc%2Fyaz-log-man.xml;h=abf9ccf69e4f8a9769501db624fbc607fe24b2c6;hp=5f98ee485659f441a33823ef545bdd8073b9b5c8;hb=053367cbe356fb3ce0def34b065dae589d700daf;hpb=f0fff840ae259cab0b1c17297c4367172a7cd229 diff --git a/doc/yaz-log-man.xml b/doc/yaz-log-man.xml index 5f98ee4..abf9ccf 100644 --- a/doc/yaz-log-man.xml +++ b/doc/yaz-log-man.xml @@ -1,18 +1,31 @@ - - + + %local; + + %entities; + + %idcommon; +]> + + YAZ + &version; + Index Data + + yaz-log 7 + Conventions and miscellaneous - + yaz-log Log handling in all yaz-based programs - + yaz-XXXX @@ -20,7 +33,7 @@ - + DESCRIPTION All YAZ-based programs use a common log subsystem, and should support @@ -30,20 +43,31 @@ - + OPTIONS - + -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. + + @@ -64,7 +88,7 @@ LOG LEVELS TO CONTROL LOGGING - Some of the log levels control the way the log is written. + Some of the log levels control the way the log is written. flush causes the log to be flushed after every write. @@ -78,8 +102,8 @@ intended for automatic test scripts, which should produce predictable log files that are easy to compare. - - + + GENERAL LOG LEVELS IN YAZ ITSELF @@ -99,7 +123,7 @@ levels (see below). - all turns on almost all hard-coded log levels. + all turns on almost all hard-coded log levels. loglevel logs information about the log levels used by @@ -111,28 +135,28 @@ is to grep for yaz_log_module_level in the source code, as in - find . -name '*.[ch]' -print | - xargs grep yaz_log_module_level | + find . -name '*.[ch]' -print | + xargs grep yaz_log_module_level | grep '"' | - cut -d'"' -f2 | - sort -u + cut -d'"' -f2 | + sort -u - eventl, malloc, + eventl, malloc, nmem, odr are used internally for debugging yaz. - + LOG LEVELS FOR CLIENTS zoom logs the calls to the zoom API, which may be useful in debugging client applications. - + LOG LEVELS FOR SERVERS @@ -155,9 +179,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: @@ -207,9 +231,22 @@ 14:45:41-23/11 yaz-ztest [requestdetail] Request to pack 1+1 1 14:45:41-23/11 yaz-ztest [requestdetail] pms=1048576, mrs=1048576 14:45:41-23/11 yaz-ztest [request] Present: [1] 1+1 OK 1 records returned - + + + + + 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 @@ -219,15 +256,40 @@ SEE ALSO - yaz(7) - yaz-ztest(8) yaz-client(1) + + yaz + 7 + + + + yaz-ztest + 8 + + + + yaz-client + 1 + + + + strftime + 3 + - -