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...
7 gadus atpakaļ
Yann Weber
768ac367d9
Fix #12 sorting options in help text
But not by alphabetical order :P
7 gadus atpakaļ
Yann Weber
fc3d64c29b
Manpage update
7 gadus atpakaļ
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...
7 gadus atpakaļ
Yann Weber
d89f8a64e5
Fix #9 add nginx date format to ttail.h
7 gadus atpakaļ
Yann Weber
5876beb864
Manpage update & generation bugfix
The manpage update was broken. Now make docs updates the manpage.
7 gadus atpakaļ
Yann Weber
3b330e114b
Fix #4 Relative dates brakes format detection
Date detection on stdin enabled
7 gadus atpakaļ
Yann Weber
aa31c07bf1
Add a new debug function
7 gadus atpakaļ
Yann Weber
7dbc99e4a0
Fixing issue #4 for logfiles
Not done for stdin
7 gadus atpakaļ
Yann Weber
fe382fff5f
ttail_format_guess() do not take ttail_t* as argument
Making this function usable by logfiles and stdin format autodetection
7 gadus atpakaļ
Yann Weber
5af21265b0
Tests + bugfix for ttail_tm_cmp() function
7 gadus atpakaļ
Yann Weber
014d5ffb1f
Changed headers of _ttail_file_(next|start)_line()
7 gadus atpakaļ
Yann Weber
3a4fe6be94
Add tests for _ttail_norm_dates
7 gadus atpakaļ
Yann Weber
e92e62046e
Renaming _ttail_file_search_from_end()
7 gadus atpakaļ
Yann Weber
6734c8ad36
Preparing autoformat detection on loglines
7 gadus atpakaļ
Yann Weber
8684cc7b38
Fix #5 GPL
7 gadus atpakaļ
Yann Weber
67e9aa752a
Fix #2 Implements stdin operations
Seems to work with stdin
7 gadus atpakaļ
Yann Weber
e27ad730c5
Generalization of ttail_getline() macro
7 gadus atpakaļ
Yann Weber
04f0ddd897
Add relative date documentation to manpage
7 gadus atpakaļ
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
7 gadus atpakaļ
Yann Weber
9586697f56
Updates in manpage & autotools
7 gadus atpakaļ
Yann Weber
2f1458f3f3
Add ttail manpage
7 gadus atpakaļ
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)
7 gadus atpakaļ
Yann Weber
9d5c000dfa
Bugfix & headers update
Deleted old argument struct tm* from search function (now using infos
stored in ttail_t.session )
7 gadus atpakaļ
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
7 gadus atpakaļ
Yann Weber
e3e636e298
Implements support for max-date
7 gadus atpakaļ
Yann Weber
3ca964c51e
Implements help & usage
7 gadus atpakaļ
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
7 gadus atpakaļ
Yann Weber
5e5f730815
Bugfix + tests for ttail_search_files functions
7 gadus atpakaļ
Yann Weber
9b99e070a9
Change utils on struct tm
Enhancement in comparison behavior + print function
7 gadus atpakaļ
Yann Weber
533bb6b52e
Adding missing arguments to search functions
7 gadus atpakaļ
Yann Weber
5f7d34f9de
[broken] Files searching function 1st implementation
untested
7 gadus atpakaļ
Yann Weber
261248f6a7
Add some inline functions + utility function
Set some function inlune and implement an utility function
for file searching functions.
7 gadus atpakaļ
Yann Weber
e371b34f7d
Make some arg const + add autoconf check
7 gadus atpakaļ
Yann Weber
5ccb971b71
Implement the _ttail_search_file_sorted() function
Telling if the logfile array is sorted
7 gadus atpakaļ
Yann Weber
a01866eea7
Implements a struct tmp comparison function
7 gadus atpakaļ
Yann Weber
55b331a15e
Add tests on ttail_logline2date() function
7 gadus atpakaļ
Yann Weber
e1391139ab
Add setters for RE flags and use them
ttail_set_flag_re_ex() and ttail_set_flag_re_ci()
7 gadus atpakaļ
Yann Weber
e2d2d7f0db
ttail_logline2date() implementation
7 gadus atpakaļ
Yann Weber
a4c65684bf
Implement & use a ttail_set_fmt() + tests
7 gadus atpakaļ
Yann Weber
5de36b3ecc
Implements logline subst + tests
7 gadus atpakaļ
Yann Weber
38d7ad4d90
Add regex flags support
For extended & case insensitive regex
7 gadus atpakaļ
Yann Weber
ce41eddb7a
Add another prefix subst method + tests
Now we can specify a constant length to cut
7 gadus atpakaļ
Yann Weber
b0b9e0a77e
Move options declaration + warn fixes
7 gadus atpakaļ
Yann Weber
89739fc1e6
**temporary commit**
7 gadus atpakaļ
Yann Weber
01c295d459
Code cleaning, updated tests + getline wrapper
The getline wrapper will allow to use getline without calling malloc
and free all the time
7 gadus atpakaļ
Yann Weber
b74ee6957f
Implemented 2 utility functions + tests
7 gadus atpakaļ
Yann Weber
7088bcae86
Deleted olf stuff
7 gadus atpakaļ
Yann Weber
2ff86aadef
File spliting
7 gadus atpakaļ
Yann Weber
26f51ae8a6
Started to implement file search op
7 gadus atpakaļ