home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2004 May / Gamestar_62_2004-05_dvd.iso / Programy / apache_2.0.48-win32-x86-no_ssl.msi / Data.Cab / F252897_rotatelogs.xml < prev    next >
Extensible Markup Language  |  2003-04-29  |  4KB  |  106 lines

  1. <?xml version='1.0' encoding='UTF-8' ?>
  2. <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
  3. <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
  4. <manualpage metafile="rotatelogs.xml.meta">
  5. <parentdocument href="./">Programs</parentdocument>
  6.  
  7.   <title>rotatelogs - Piped logging program to rotate Apache logs</title>
  8.  
  9. <summary>
  10.      <p><code>rotatelogs</code> is a simple program for use in
  11.      conjunction with Apache's piped logfile feature.  For example:</p>
  12.  
  13. <example>
  14.      CustomLog "|bin/rotatelogs /var/logs/logfile 86400" common
  15. </example>
  16.      
  17.      <p>This creates the files /var/logs/logfile.nnnn where nnnn  is
  18.      the system time at which the log nominally starts (this time
  19.      will always be a multiple of the rotation time, so  you  can
  20.      synchronize cron scripts with it).  At the end of each rota-
  21.      tion time (here after 24 hours) a new log is started.</p>
  22.  
  23. <example>     
  24.      CustomLog "|bin/rotatelogs /var/logs/logfile 5M" common
  25. </example>
  26.  
  27.      <p>This configuration will rotate the logfile whenever it reaches
  28.      a size of 5 megabytes.</p>
  29.      
  30. </summary>
  31.  
  32. <section id="synopsis"><title>Synopsis</title>
  33.  
  34.      <p><code><strong>rotatelogs</strong> <var>logfile</var>
  35.      [ <var>rotationtime</var> [ <var>offset</var> ]] |
  36.      [ <var>filesize</var>M ]</code></p>
  37. </section>
  38.  
  39. <section id="options"><title>Options</title>
  40.  
  41. <dl>
  42.  
  43. <dt><code><var>logfile</var></code></dt>
  44.  
  45. <dd>The path plus basename of the logfile.  If <var>logfile</var>
  46. includes any '%' characters, it is treated as a format string for
  47. <code>strftime(3)</code>.  Otherwise, the suffix
  48. <var>.nnnnnnnnnn</var> is automatically added and is the time in
  49. seconds.  Both formats compute the start time from the beginning of
  50. the current period.</dd>
  51.  
  52. <dt><code><var>rotationtime</var></code></dt>
  53.  
  54. <dd>The time between log file rotations in seconds.</dd>
  55.  
  56. <dt><code><var>offset</var></code></dt>
  57.  
  58. <dd>The number of minutes offset from UTC.  If omitted, zero is
  59. assumed and UTC is used.  For example, to use local time in the zone
  60. UTC -5 hours, specify a value of <code>-300</code> for this argument.</dd>
  61.  
  62. <dt><code><var>filesize</var>M</code></dt>
  63.  
  64. <dd>The maximum file size in megabytes followed by the letter
  65. <code>M</code> to specify size rather than time.  Use this parameter
  66. in place of both rotationtime and offset.</dd>
  67. </dl>
  68. </section>
  69.  
  70. <section id="portability"><title>Portability</title>
  71.  
  72. <p>The following logfile format string substitutions should be
  73. supported by all <code>strftime(3)</code> implementations, see
  74. the <code>strftime(3)</code> man page for library-specific
  75. extensions.</p>
  76.  
  77. <table border="1" style="zebra">
  78. <tr><td><code>%A</code></td><td>full weekday name (localized)</td></tr>
  79. <tr><td><code>%a</code></td><td>3-character weekday name (localized)</td></tr>
  80. <tr><td><code>%B</code></td><td>full month name (localized)</td></tr>
  81. <tr><td><code>%b</code></td><td>3-character month name (localized)</td></tr>
  82. <tr><td><code>%c</code></td><td>date and time (localized)</td></tr>
  83. <tr><td><code>%d</code></td><td>2-digit day of month</td></tr>
  84. <tr><td><code>%H</code></td><td>2-digit hour (24 hour clock)</td></tr>
  85. <tr><td><code>%I</code></td><td>2-digit hour (12 hour clock)</td></tr>
  86. <tr><td><code>%j</code></td><td>3-digit day of year</td></tr>
  87. <tr><td><code>%M</code></td><td>2-digit minute</td></tr>
  88. <tr><td><code>%m</code></td><td>2-digit month</td></tr>
  89. <tr><td><code>%p</code></td><td>am/pm of 12 hour clock (localized)</td></tr>
  90. <tr><td><code>%S</code></td><td>2-digit second</td></tr>
  91. <tr><td><code>%U</code></td><td>2-digit week of year 
  92. (Sunday first day of week)</td></tr>
  93. <tr><td><code>%W</code></td><td>2-digit week of year 
  94. (Monday first day of week)</td></tr>
  95. <tr><td><code>%w</code></td><td>1-digit weekday 
  96. (Sunday first day of week)</td></tr>
  97. <tr><td><code>%X</code></td><td>time (localized)</td></tr>
  98. <tr><td><code>%x</code></td><td>date (localized)</td></tr>
  99. <tr><td><code>%Y</code></td><td>4-digit year</td></tr>
  100. <tr><td><code>%y</code></td><td>2-digit year</td></tr>
  101. <tr><td><code>%Z</code></td><td>time zone name</td></tr>
  102. <tr><td><code>%%</code></td><td>literal `%'</td></tr>
  103. </table>
  104.  
  105. </section>
  106. </manualpage>