Yann Weber
2b63e70596
Fix #20
set_relative_date was failing if the resulting date was in the previous
day.
6 lat temu
Yann Weber
0c4acf1fba
Fix #18
Following PR #19
6 lat temu
Yann Weber
a05a5dda01
Bugfix in _ttail_search_closest_stdin()
8 lat temu
Yann Weber
bcecc4d5f1
Add test for ttail_search_std_init()
Add some usefull functions & macro in ttail_check.h for std tests.
8 lat temu
Yann Weber
abe01c0733
Add test for _ttail_file_search_from_end
And updated doxygen todo list
8 lat temu
Yann Weber
48280fa6d5
Bugfix in relative dates calculation
8 lat temu
Yann Weber
6e006b35bd
Add comment for set_date_relative + ttail_check.h refactoring
8 lat temu
Yann Weber
050d81aeb2
Fix #16 Write tests for _ttail_set_date_relative()
And bugfixes in _ttail_set_date_relative() bad format detection
8 lat temu
Yann Weber
2fc89b7c52
Set headers as noinst_HEADERS
In order to not install them.
8 lat temu
Yann Weber
3c2cfd848d
Add forgotten return value test
8 lat temu
Yann Weber
0bd8dd1e1f
Fix #13 Sort files given as argument
Now ttail is able to sort logfiles given as arguement.
The sort function _ttail_file_sort place files with no valid date to the
end of the file list and is able to detect if some files overlaps.
No tests written...
8 lat temu
Yann Weber
768ac367d9
Fix #12 sorting options in help text
But not by alphabetical order :P
8 lat temu
Yann Weber
fc3d64c29b
Manpage update
8 lat temu
Yann Weber
489f5b801c
Enhancement & bugfix in #11 solution
8 lat temu
Yann Weber
3e5304bf91
Fix #11
Not 100% sur of implementation. And the feature seems a bit useless..
8 lat temu
Yann Weber
bbaa6b84b4
Fix starts for #11
Adds the option -P --permissive.
Starts implementation for logfiles.
Now -P flag make ttail handle invalid files. When invalid file given the
minmax function set the file pointer and the minmax array to NULL.
May introduce bugs if the binary search function does not handles "holes"
in fp array or in minmax array...
8 lat temu
Yann Weber
42457370ba
Enhancement in option parsing errors
Telling getopt to produce an error message by setting opterr to 1
8 lat temu
Yann Weber
d89f8a64e5
Fix #9 add nginx date format to ttail.h
8 lat temu
Yann Weber
e314231033
Fix #7 correcting _ttail_search_closest_stdin() returned value
8 lat temu
Yann Weber
5876beb864
Manpage update & generation bugfix
The manpage update was broken. Now make docs updates the manpage.
8 lat temu
Yann Weber
3b330e114b
Fix #4 Relative dates brakes format detection
Date detection on stdin enabled
8 lat temu
Yann Weber
aa31c07bf1
Add a new debug function
8 lat temu
Yann Weber
7dbc99e4a0
Fixing issue #4 for logfiles
Not done for stdin
8 lat temu
Yann Weber
fe382fff5f
ttail_format_guess() do not take ttail_t* as argument
Making this function usable by logfiles and stdin format autodetection
8 lat temu
Yann Weber
55ae3693aa
Fix #6 now make dist produce a good tarball
8 lat temu
Yann Weber
5af21265b0
Tests + bugfix for ttail_tm_cmp() function
8 lat temu
Yann Weber
014d5ffb1f
Changed headers of _ttail_file_(next|start)_line()
8 lat temu
Yann Weber
3a4fe6be94
Add tests for _ttail_norm_dates
8 lat temu
Yann Weber
e92e62046e
Renaming _ttail_file_search_from_end()
8 lat temu
Yann Weber
6734c8ad36
Preparing autoformat detection on loglines
8 lat temu
Yann Weber
8684cc7b38
Fix #5 GPL
8 lat temu
Yann Weber
67e9aa752a
Fix #2 Implements stdin operations
Seems to work with stdin
8 lat temu
Yann Weber
e27ad730c5
Generalization of ttail_getline() macro
8 lat temu
Yann Weber
04f0ddd897
Add relative date documentation to manpage
8 lat temu
Yann Weber
5e527d0f3b
Fix #3 Add support for relative dates
Date formats
Two date formats are allowed for dates arguments (-d , -m) :
- the same than in the logfile
- relative from now prefixing the argument with '#-' and given a unit
- y : year
- M : Month
- d : day
- h : hour
- m : min
- s : sec
8 lat temu
Yann Weber
9586697f56
Updates in manpage & autotools
8 lat temu
Yann Weber
2f1458f3f3
Add ttail manpage
8 lat temu
Yann Weber
710515fdab
Bugfix on invalid dateformat
Segfault was thrown when no files were found with matching date
8 lat temu
Yann Weber
bb7a4e7d65
Fix #1
Now ttail return an error if the whole date given in argument is not
matched by the format
8 lat temu
Yann Weber
833b2dae19
Bugfix & enhancement
Now an error is triggered if date-min > date-max
Bugfix on date-max searching (on multiple loglines with a date == date-max)
8 lat temu
Yann Weber
2283a16991
Bugfix on datemax > max date
8 lat temu
Yann Weber
1207a9f742
Better error handling
Add some perror calls
8 lat temu
Yann Weber
9d5c000dfa
Bugfix & headers update
Deleted old argument struct tm* from search function (now using infos
stored in ttail_t.session )
8 lat temu
Yann Weber
782f70e7fc
Enhancement & changes in arguments parsing
add a -h --help option, deleted -l --logfile options
+ spliting the ttail_search_closest() & ttail_search_print_res() functions
8 lat temu
Yann Weber
e3e636e298
Implements support for max-date
8 lat temu
Yann Weber
3ca964c51e
Implements help & usage
8 lat temu
Yann Weber
a234df34c9
Add ttail_free() call in main
8 lat temu
Yann Weber
93415c6adb
Enhancement in ttail init checking function
To handle case where none of the file given as argument is readable
8 lat temu
Yann Weber
fd5d6cad18
Bugfix & function implementation
Now we have a running minimal ttail :
src/ttail -d "Mar 6 00:29" -f '%B%n%d %H:%M' -l tests/samples/1.log -l tests/samples/1.1.log
8 lat temu
Yann Weber
9f5cf21919
Tests + bugfix
Testing ttail_search_closest_files() on multiple files
8 lat temu