timed tail for logfiles. Display loglines given a minimum date and/or a maximum date.
c
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

doxygen.h 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /**@page ttail
  2. *@brief timed tail for logfiles
  3. *@section SYNOSPIS
  4. *ttail [OPTION]... [FILE]...
  5. *@section DESCRIPTION
  6. *Display loglines given a minimum date and/or a maximum date.
  7. *
  8. *For huge files (or a huge list of files) you should have better performance
  9. *giving files as argument (thank's to binary search on file list and in files).
  10. *
  11. *@par -d --date-min=DATE
  12. *Start to output loglines starting from this date
  13. *@par -m --date-max=DATE
  14. *Stop to output loglines starting from this date
  15. *@par -f --date-format=FMT
  16. *The date format present in the logfiles and used by -d --date-min and
  17. *-m --date-max options (see @ref datefmt for more details)
  18. *@par -p --prefix-len
  19. *Set a constant prefix len to drop for each logline
  20. *@par -P --permissive
  21. *Tell ttail to continue after some errors (prefix or date not found, invalid file, etc.)
  22. *@par -r --re-prefix=REGEX
  23. *Drop matching prefix for each logline
  24. *@par -E --re-extended
  25. *Interpret -r --re-prefix as an extended regular expression (specified by
  26. *POSIX)
  27. *@par -I --re-ignore-cas
  28. *Ignore case for -r --re-prefix option (specified by POSIX)
  29. *@par -v[v[v[...]]]
  30. *Augment the loglevel
  31. *
  32. *@section datefmt Date formats
  33. *
  34. * ttail understand two date formats : strprtime and relative
  35. *
  36. *@subsection datefmt_rel Relative date format
  37. *Relative date format is used with -d --date-min or -m --date-max arguments.
  38. *The shape of a relative date is "-#[VAL][UNIT]" with VAL an integer and UNIT
  39. *one of the recognized units :
  40. *- y[ear]
  41. *- M[onth]
  42. *- d[ay]
  43. *- h[our]
  44. *- m[in]
  45. *- s[ec]
  46. *
  47. *@subsection datefmt_strptime Strptime date format
  48. * The supported input field descriptors are listed below. In case a text string (such as the name
  49. * of a day of the week or a month name) is to be matched, the comparison is case insensitive. In
  50. * case a number is to be matched, leading zeros are permitted but not required.
  51. *
  52. * \%% The % character.
  53. *
  54. * \%a or %A
  55. * The name of the day of the week according to the current locale, in abbreviated form or
  56. * the full name.
  57. *
  58. * \%b or %B or %h
  59. * The month name according to the current locale, in abbreviated form or the full name.
  60. *
  61. * \%c The date and time representation for the current locale.
  62. *
  63. * \%C The century number (0-99).
  64. *
  65. * \%d or %e
  66. * The day of month (1-31).
  67. *
  68. * \%D Equivalent to %m/%d/%y. (This is the American style date, very confusing to non-Ameri‐
  69. * cans, especially since %d/%m/%y is widely used in Europe. The ISO 8601 standard format
  70. * is %Y-%m-%d.)
  71. *
  72. * \%H The hour (0-23).
  73. *
  74. * \%I The hour on a 12-hour clock (1-12).
  75. *
  76. * \%j The day number in the year (1-366).
  77. *
  78. * \%m The month number (1-12).
  79. *
  80. * \%M The minute (0-59).
  81. *
  82. * \%n Arbitrary whitespace.
  83. *
  84. * \%p The locale's equivalent of AM or PM. (Note: there may be none.)
  85. *
  86. * \%r The 12-hour clock time (using the locale's AM or PM). In the POSIX locale equivalent to
  87. * \%I:%M:%S %p. If t_fmt_ampm is empty in the LC_TIME part of the current locale, then the
  88. * behavior is undefined.
  89. *
  90. * \%R Equivalent to %H:%M.
  91. *
  92. * \%S The second (0-60; 60 may occur for leap seconds; earlier also 61 was allowed).
  93. *
  94. * \%t Arbitrary whitespace.
  95. *
  96. * \%T Equivalent to %H:%M:%S.
  97. *
  98. * \%U The week number with Sunday the first day of the week (0-53). The first Sunday of Janu‐
  99. * ary is the first day of week 1.
  100. *
  101. * \%w The ordinal number of the day of the week (0-6), with Sunday = 0.
  102. *
  103. * \%W The week number with Monday the first day of the week (0-53). The first Monday of Janu‐
  104. * ary is the first day of week 1.
  105. *
  106. * \%x The date, using the locale's date format.
  107. *
  108. * \%X The time, using the locale's time format.
  109. *
  110. * \%y The year within century (0-99). When a century is not otherwise specified, values in the
  111. * range 69-99 refer to years in the twentieth century (1969-1999); values in the range
  112. * 00-68 refer to years in the twenty-first century (2000-2068).
  113. *
  114. * \%Y The year, including century (for example, 1991).
  115. *
  116. * Some field descriptors can be modified by the E or O modifier characters to indicate that an
  117. * alternative format or specification should be used. If the alternative format or specification
  118. * does not exist in the current locale, the unmodified field descriptor is used.
  119. *
  120. *
  121. * The E modifier specifies that the input string may contain alternative locale-dependent versions
  122. * of the date and time representation:
  123. *
  124. * \%Ec The locale's alternative date and time representation.
  125. *
  126. * \%EC The name of the base year (period) in the locale's alternative representation.
  127. *
  128. * \%Ex The locale's alternative date representation.
  129. *
  130. * \%EX The locale's alternative time representation.
  131. *
  132. * \%Ey The offset from %EC (year only) in the locale's alternative representation.
  133. *
  134. * \%EY The full alternative year representation.
  135. *
  136. * The O modifier specifies that the numerical input may be in an alternative locale-dependent for‐
  137. * mat:
  138. *
  139. * \%Od or %Oe
  140. * The day of the month using the locale's alternative numeric symbols; leading zeros are
  141. * permitted but not required.
  142. *
  143. * \%OH The hour (24-hour clock) using the locale's alternative numeric symbols.
  144. *
  145. * \%OI The hour (12-hour clock) using the locale's alternative numeric symbols.
  146. *
  147. * \%Om The month using the locale's alternative numeric symbols.
  148. *
  149. * \%OM The minutes using the locale's alternative numeric symbols.
  150. *
  151. * \%OS The seconds using the locale's alternative numeric symbols.
  152. *
  153. * \%OU The week number of the year (Sunday as the first day of the week) using the locale's
  154. * alternative numeric symbols.
  155. *
  156. * \%Ow The ordinal number of the day of the week (Sunday=0),
  157. * using the locale's alternative numeric symbols.
  158. *
  159. * \%OW The week number of the year (Monday as the first day of the week) using the locale's
  160. * alternative numeric symbols.
  161. *
  162. * \%Oy The year (offset from %C) using the locale's alternative numeric symbols.
  163. *
  164. *@section AUTHOR
  165. *Written by Yann Weber <yann.weber@members.fsf.org>
  166. *
  167. *@section COPYRIGHT
  168. *Copyright © 2017 Weber Yann License GPLv3+: GNU GPL version 3 or later
  169. *<http://gnu.org/licenses/gpl.html>.
  170. *
  171. *This is free software: you are free to change and redistribute it.
  172. *There is NO WARRANTY, to the extent permitted by law.
  173. *
  174. */
  175. /**@mainpage
  176. *
  177. *Super options : -d -r -p -v -m
  178. */