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.2KB

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