Commit Graph

1201 Commits (48d4b51fd7dae236019585c02407e02649da358f)

Author SHA1 Message Date
Timothy Stack 5c6cc5fe2a [readline] pressing escape should exit the command prompt
Fixes #316
6 years ago
Timothy Stack 31a19ac753 [vtab] fix the SQL function adapter for vector refs 6 years ago
Timothy Stack 6336fa56e9 [cmds] :write-json-to should passthru JSON columns as JSON instead of strings
Fixes #565
6 years ago
Timothy Stack f6a84ed081 [display] fix colors on a plain xterm display 6 years ago
Timothy Stack aa0bfd6c62 [sql] add a spooky_hash() function
Fixes #567
6 years ago
Timothy Stack ec82ecda62 [filter] display the number of filters 6 years ago
Timothy Stack efe6ccf0d1 [filter] change from backquote to tab for activating filter panel 6 years ago
Timothy Stack 2345a32423 [filter] add panel that shows the set of filters
Initial version, still needs some cleanup
6 years ago
Timothy Stack 80456791ac [build] missed adding header to makefile 6 years ago
Timothy Stack b1a6d06490 [lss] refactor the force flag during indexing and some other stuff 6 years ago
Timothy Stack d74f3a13da [lnav_commands] fix attempt to convert uninitialized max_time
Fix #556
6 years ago
Timothy Stack a9a05af736 [logfile_sub_source] revert sorting change for now 6 years ago
Timothy Stack 14599839ed [logfile_sub_source] fix sorting 6 years ago
Timothy Stack 84135c44e4 [build] disable simd stuff for now 6 years ago
Timothy Stack fc8bc80f62 [build] try removing inline 6 years ago
Timothy Stack bae4897071 [build] fix pcre utf flag usage 6 years ago
Timothy Stack 2589345e5c [perf] improve initial indexing times 6 years ago
Timothy Stack 2e10ca09d0 [line_buffer] fix crlf handling in log files 6 years ago
Timothy Stack ac7ae1275a [cmds] add :redirect-to command for redirecting the output of commands in scripts
Related to #551
6 years ago
Timothy Stack ea5ac46c0e [cmds] the output of the :pipe commands should go to the top of the output stack and not to a temp file 6 years ago
Timothy Stack 53c1f03205 update includes for command_executor.hh 6 years ago
Timothy Stack e5c6c180eb [cmds] fix preview for :write-raw-to 6 years ago
Timothy Stack 5f5e2d5c4e [cleanup] prune some includes and some other cleaning
Defect Number:
    Reviewed By:
   Testing Done:
6 years ago
Timothy Stack c715807657 [perf] minor improvement in indexing 6 years ago
Timothy Stack 658931a145 [cleanup] remove cdefs.h include and other stuff
Fix #486
6 years ago
Timothy Stack 70f7bcacd9 Don't update the top if the time is not different 6 years ago
Timothy Stack 9664b015c6 [textview] preserve location in view when changing filters
Defect Number:
    Reviewed By:
   Testing Done:
6 years ago
Timothy Stack d1856b53ba [build] avoid adding -I/usr/include to CPPFLAGS
Defect Number:
    Reviewed By:
   Testing Done:
6 years ago
Timothy Stack 686ce639a0 [build] use cmath instead of math.h
Defect Number:
    Reviewed By:
   Testing Done:
6 years ago
Benny Zlotnik bec91a458e Remove redundant the
Signed-off-by: Benny Zlotnik <uber442@gmail.com>
6 years ago
Timothy Stack 562362ed67 missed including this file with the last commit 6 years ago
Timothy Stack 6a3b1f2d94 Search results are not reversed for bookmarked lines
Fix #313

Sorry for the delay
6 years ago
Timothy Stack d7699cfb96 add an ifdef for a symbol, Fix #289 6 years ago
Timothy Stack db6c619e4e [keymap] support for /dev/clipboard in :write commands
The copy hotkey is now implemented in the keymap and the
':write-*' commands were enhanced to recognize /dev/clipboard
as a special file name for writing to the system clipboard.
6 years ago
Timothy Stack 0b822739ea [readline] wait for focus before processing input
Fix for #543

Mistakenly had the read-ready bit set for stdin before the
command to focus was processed.  The result being the
readline child would exit.
6 years ago
Timothy Stack f65df7c762 [readline] tweak fuzzy matching threshold
Change the threshold for cutting off the remaining fuzzy matches
that was added for #541

Also, fix an error when filtering is added when viewing
the tail of the log.
6 years ago
Timothy Stack f241704a93 [readline] do a fuzzy match if the prefix match fails to find anything
Prototype for #541
6 years ago
Timothy Stack bc26b92199 [json] some more journald log tweaks
Defect Number:
    Reviewed By:
   Testing Done:
6 years ago
Timothy Stack ca7b4b2168 [lint] fix a couple more struct/class complaints 6 years ago
Timothy Stack 65b6ecb6ba [lint] change log_state_dumper tag 6 years ago
Timothy Stack 26cccdafce [locale] some tweaks for recognizing non-english logs
Try to address some locale issues brought up in #533
6 years ago
Timothy Stack 0b36da15a6 add monotonic timestamp back to the journald format, map priority 1 to fatal as well 6 years ago
Timothy Stack b1ff6b3a3b [json-log] fix some inconsistencies with json logs
Fill some gaps brought up in #535
6 years ago
Timothy Stack 00baf0a1d9 [cmds] return an error when :hide-unmarked-lines is run when no lines are marked 6 years ago
Timothy Stack 470e317d87 [overlay] shift the comment/tag overlays when the filename is displayed on the left 6 years ago
Timothy Stack 3e457e30ca [json-format] fix json file recognition for crlf line-endings
Fixes #528
6 years ago
Timothy Stack 00ed12557b [keymap] add more keys to the keymap 6 years ago
Timothy Stack c3097db7af [filter] fix some nits in the filter command 6 years ago
Timothy Stack 59c31925de [log_format] missing highlight colors
The highlighter copy constructor wasn't copying the colors over
6 years ago
Timothy Stack d805dee15f [line_buffer] avoid a crash with binary files, but still not handled well 6 years ago
Timothy Stack 8df3ebf709 [top_status_line] use the unique path for the filename if there is not enough room to display the full path
Trying to address #526
6 years ago
Timothy Stack 0ee6bdd5bf [sql] the log_part column was not correct in some cases 6 years ago
Timothy Stack 77302eb980 [build] fix some build issues 6 years ago
Timothy Stack 5e8983b857 [sql-view] pressing tab should hide bart charts
Fixes #514
6 years ago
Timothy Stack bc8e51914a [hotkey] the "P" hotkey was not toggling the view
Fixes #522
6 years ago
Timothy Stack d1da7b800c [ptime] fix %p and %l 6 years ago
Timothy Stack 6bfd158e49 [logline] check for SQL keywords in column names 6 years ago
Timothy Stack b94571c58e [build] fixes... 6 years ago
Timothy Stack 5689984702 [yajlpp] use pointer to member over nullobj() 6 years ago
Timothy Stack 9e1411f113 [ptime] fix am/pm issue again
Fixes #520
6 years ago
Timothy Stack 5e0dabb231 [ptime] fix offset in failed parse for a few cases 6 years ago
Timothy Stack 030c33476c [sql] fix some copy pasta 6 years ago
Timothy Stack 2070c669de [ptime] fix PM offset
Fixes #517
6 years ago
Timothy Stack a741236c76 [sql] missed a null check on log_time in vt_filter
Fixes #518
6 years ago
Timothy Stack 36d5ff8b86 [lo-fi] display fixes
Fixes #513
Fixes #516
6 years ago
Timothy Stack f3d37cd4d6 [build] json_contains issue 6 years ago
Timothy Stack 4ccae48aea [bookmarks] add support for tags and comments for log lines
Initial work for #446 and #447
  TODO: filtering on tags/comments

Also did a bunch of clang-tidy cleanups and improvements to
the online help.
6 years ago
Timothy Stack b8fc956677 [search-table] match against the whole line and not just the body 6 years ago
Timothy Stack 7fb881222d [pretty] highlight log messages in the pretty view as in the normal log view 6 years ago
Timothy Stack 697d22705d [generic_log] include more of the line in the body for a generic log message 7 years ago
Timothy Stack c83c31fb65 [sql-view] use A_REVERSE with graphable column names since it's hard to see the color otherwise 7 years ago
Nicolas Werner 5594120f1a Use CTRL macro from readline instead of CEOF from ttydefaults.h
The ttydefaults.h header is not available on musl. Readline provides the
same functionality with its CTRL macro and it makes the intent of the
code a bit clearer (that we check for CTRL-D).
7 years ago
Nicolas Werner f15add0abb Don't dereference FILE*
This is undefined behavour and doesn't work on musl
7 years ago
Timothy Stack 3293388165 [generic_log] allow optional stars at the front of the log messages 7 years ago
Timothy Stack 873fc4dc2e [logfile_sub_source] handle closed file 7 years ago
Emiliano Bonassi 37f46af7a6 [fmt] add AWS Application Load Balancer (ELB v2) format 7 years ago
Timothy Stack 809159140c [unique_path] fix an infinite loop when files rolled 7 years ago
Timothy Stack af36896f50 [sanitize] some fixes for issues found in the address sanitizer 7 years ago
Timothy Stack e001d87862 [view_curses] fix for multiple tabs 7 years ago
Timothy Stack 7c5fc44f7d [view_curses] fix highlighting when a line contains unicode
Take into account unicode codepoint lengths when adjusting
attribute ranges
7 years ago
Timothy Stack db0d2fc231 [view_curses] fix graphics rendering 7 years ago
Timothy Stack 9f91d3b447 [log-view] display the unique parts of the file name instead of just the base
Instead of just displaying the base name of the file, try to include some
additional parts of the path that make a unique string.
7 years ago
Timothy Stack 2ed99695a2 [data_parser] fix for empty list 7 years ago
Timothy Stack 1ed0ff7e0f [pretty-print] check if lines are XML before indenting them as such
Also, update the scanner for changes to re2c
7 years ago
Timothy Stack 5268872d1e [build] oops 7 years ago
Timothy Stack ecb1af304d [view_curses] fix search highlights
Cleanup the styling code, never really redid it after
switching to use mvwin_wchnstr

Fixes #493
7 years ago
Timothy Stack 0a8b740807 Return early if json parsing fails
Fixes #505
7 years ago
Phil Hord 3f7f80e32c Squash various compiler warnings
Unused-result from sensitive APIs, printf/scanf formatting types, set
but never used variables, and uninitialized variables.

Also there's one select(enum) that doesn't cover all cases.
7 years ago
Phil Hord eee7d0ddfc Squash a bunch of signed/unsigned warnings 7 years ago
Phil Hord 5a20829ed4 dynamic exception specifications are deprecated in C++11
Remove exception specifications to appease modern compilers and reduce
warning counts.

I sort of hate to remove all these exception-decls, but they are in fact
deprecated, and my compiler loves to complain.
7 years ago
Timothy Stack 87cbab1ac3 [index] do a full sort if new lines have a timestamp before the last indexed 7 years ago
Timothy Stack ef34a6aaaf [search] display lines matching the search in preview instead of jumping to the first
Jumping around can be disruptive, instead show matches in
the preview window.
7 years ago
Timothy Stack 36932b148d [hotkeys] cleanup the last commit 7 years ago
Timothy Stack 8257f188cb [hotkeys] change the filename hotkey to left/right arrow 7 years ago
Phil Hord 4d4ac9b8b0 Add another filename mode to show file path
Add a separate BASENAME bit to distinguish from the FILENAME bit.
When BASENAME is active show the base filename in the filename column.
When FILENAME is active show the whole path for each filename.  Cycle
through the three modes with toggle_filename() still. Note that we are
never in both FILENAME and BASENAME mode.

The user can cycle through the three modes by pressing the hotkey an
extra time.  First press shows the basename, second press shows the full
path (filename), and the third press hides the filename column again.
7 years ago
Phil Hord 81974c6bdc Fix filename column width and attributes
Display the basename instead of the whole path for each file when
the filename column is displayed. Make the column the same width all
the time, taking the maximum basename width of all loaded files and
padding with spaces.

Also fix the attributes when the filename column is displayed.  Insert
the correct filename-matching color for as many characters as we add for
the filename column.  Use the full filename when looking up the color
because we don't want files in different paths to have the same color,
and we don't want the color to change based on whether we are displaying
the base or the whole filename.
7 years ago
Adam Spiers 9ffbc1ac46 make '.' toggle prefixing each log line with filename
Mostly addresses #277.  I won't claim it fully closes it, because there
are at least two ways it could be improved:

1. It doesn't draw a nice coloured divider in the column after the
   filename, and that would provide maximum visual clarity and
   consistency with the existing presentation.

2. It would be nice if the filenames weren't shown on every single line,
   but only on the first line of a contiguous chunk of log lines from a
   single file (or on the top line of the screen if the first line of
   the chunk was already scrolled off the top).

3. It doesn't yet include the filename in the text copied to the
   clipboard when the 'c' hotkey is pressed.
7 years ago
Adam Spiers 47a7b5ce02 fix std::remove call in path.h
It's trying to use std::remove from cstdio.  Apparently path.h isn't
currently used for anything, since it didn't even compile ...
7 years ago
Phil Hord 4d1d782007 string2level uses wrong string length
It should pass only the matched length, not the original string length.
Caught by -fsanitize=address while trying to parse "some string (DEBUG)"
Probaby deserves a unit test.
7 years ago
Timothy Stack 9e8efae48e [vt52] add mapping for KEY_HOME if it's not found
Fixes #501
7 years ago
Timothy Stack ebf20a746b [commands] fix completion for delete-filter 7 years ago
Timothy Stack 88a192aeeb [line_buffer] if the size of the file is known, reduce the requested buffer size and ignore attempts to shrink the buffer 7 years ago
Timothy Stack fe6781d3e8 [reltime] support milliseconds when specifying a partial absolute time
Fixes #499
7 years ago
Tim Stack faf47ca041
Merge pull request #496 from phord/master
Replace mkstemp with std::tmpfile
7 years ago
Tim Stack e9c9d8ba51
Merge pull request #487 from mterron/patch-1
Fix comparison between signed and unsigned int
7 years ago
Phil Hord 1ae4a04e42 Replace mkstemp with std::tmpfile
TMPDIR is not always defined in the environment but the code doesn't check
for that. Let's used std::tmpfile instead.

Maybe an easier fix is to perform the tmpdir lookup better, but that is
also noisy since the search for a decent tmpdir is based on lore.

std::tmpfile() is rather clean. However it does not leave a nice filename
name around for debugging, so I understand why it might not be preferred.

Fixes #495
7 years ago
Timothy Stack 352d16f4cf [line-buffer] fix resize to use the requested size
When reading in a full message, we need to make sure the buffer
is large enough to accommodate the full thing.
7 years ago
Terror 794595fde1
Fix comparison between signed and unsigned int
Fixes warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
7 years ago
Timothy Stack 7f99955cbc [misc] fix a perf issue when previewing commands and some sql fixes 7 years ago
Timothy Stack 7d7060ae4c [generic_log] fix recognition for generic logs
The generic format picks up extra text in the timestamp, which
caused the date time scanner to reject some matches.  I think
it's okay to allow for some trailing junk, so it no longer
ensures the size of the match is the same as the input.
7 years ago
Timothy Stack bdcfc5cfdd [misc] rounding some corners 7 years ago
Timothy Stack 75ccb8ca4f [layout] fix a crash with a small window 7 years ago
Timothy Stack a6d4563d7d [build] missing header 7 years ago
Timothy Stack 74b58ed9fc [highlights] allow the highlight color to be specified in log formats
Defect Number:
    Reviewed By:
   Testing Done:
7 years ago
Medina Maza b4152056af Added time format for day month year hour:minutes:seconds and optional millis 7 years ago
Timothy Stack 4b40b3f9f5 [date-time] add a formatter for 0x0p+0
Defect Number:
    Reviewed By:
   Testing Done:
7 years ago
Timothy Stack b5f5b4137c [search] redo search after filtering
Fixes #480
7 years ago
Timothy Stack f25980df03 [ui] rework the default colors change
The default colors change resulted in some parts of the lnav
UI being colored incorrectly.  I've reworked it a bit so that
the ansi color pairs are preserved and the default colors are
only used with the color pairs for roles.  I've also replaced
references to ansi colors with roles in a few places to make
things work consistently.
7 years ago
Timothy Stack 5d2dffad35 [cmd] redo deleting command-prompt char should exit prompt
My first attempt at this wasn't right and would exit the prompt
when an escape sequence was received and the prompt was empty
(like going back through history).
7 years ago
Suresh Sundriyal 4483722b1d Fix the __clang__ macro. 7 years ago
Suresh Sundriyal 060a437754 Fix the filedesciptior assignment 7 years ago
Suresh Sundriyal 217d365672 Redefine _WCHAR_H_CPLUSPLUS_98_CONFORMANCE_ only on OpenBSD 7 years ago
Suresh Sundriyal 1a7e2fee9b Redefine _WCHAR_H_CPLUSPLUS_98_CONFORMANCE_ only if needed. 7 years ago
Suresh Sundriyal 72f3d7951b Don't redefine rl_completer_word_break_characters 7 years ago
Suresh Sundriyal 23c1f7ba4f [OpenBSD] Define _WCHAR_H_CPLUSPLUS_98_CONFORMANCE_ only when using Clang. 7 years ago
Suresh Sundriyal 0c88eeeb07 Fix lnav builds on OpenBSD.
* Remove all the wordexp related unused headers and code.
* stdout does not appear to be reassignable on OpenBSD.
* defining _WCHAR_H_CPLUSPLUS_98_CONFORMANCE_ seems to fix the const
  correctness related redefinitions between wchar.h imported from
  the system libc and the one imported by clang++ STL.
7 years ago
Timothy Stack c8fc0db481 [ui] deleting command-prompt char should exit prompt 7 years ago
Suresh Sundriyal 150252e578 [command] Add a ':quit' command.
Add a ':quit' command and add ':q' as the alias for the
quit command.

Closes #470
7 years ago
Tim Stack d4defbaaf7 Merge pull request #468 from konmeo/master
add config option to use default fg/bg colors
7 years ago
Timothy Stack e615805ac6 [cmds] remove completion for highlight after clearing
Fixes #465
7 years ago
Timothy Stack 689bcadc94 [time_fmts] add a default time format
Fixes #467
7 years ago
Kevin Pham 52f78cfb75 add config option to use default fg/bg colors 7 years ago
Timothy Stack 485a931793 [headless] always switch to the DB view after executing a SQL command, even if the result set is empty 7 years ago
Timothy Stack f6e01e9ad0 [build] fix for last checkin 7 years ago
Timothy Stack 753e12d606 [unicode] do not clobber wide chars when applying attributes
Attempt to address #414
7 years ago
Timothy Stack 2e095fb03e [time] add a time format 7 years ago
Thomas Hurst 24aa8cfd61 [logfile] Fix format string in debug log.
Resolves a crash on startup on FreeBSD/i386.
7 years ago
Timothy Stack 7240aaa127 [time] an epoch timestamp should not have whitespace 7 years ago
Timothy Stack a9fd0e37f6 [formats] add rfc5424 syslog format
Fixes #444
8 years ago
Timothy Stack d18b344489 [perf] avoid an initial forced index rebuild
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 371e79ff3d [log_format] allow external logs to specify that they are not time-ordered 8 years ago
Timothy Stack 9d249004ac [time-offset] add days to offset
Fixes #435
8 years ago
Timothy Stack 7ed6cc4858 [crash] handle recovery more flexibly
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 36e46fc67b [log] do a full sort if there is a year rollover
Fixes #437
8 years ago
Timothy Stack 7f5916d480 [crash] call endwin() after a crash
Fixes #438
8 years ago
Timothy Stack 9764cb1a93 [loader] add line numbers for parse errors
Fixes #442
8 years ago
Timothy Stack ceb4fe7721 [log_format] fix line sorting 8 years ago
Timothy Stack 867504b2b5 [build] try to fix some tests
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 4f47c34c92 [build] missing strnstr 8 years ago
Timothy Stack 8ea51a6fd8 [formats] support for CSV/TSV log formats
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 143b356031 Fixes #441 8 years ago
Timothy Stack d2d7f78827 [build] missed header 8 years ago
Timothy Stack 16fd7ec785 [help] remove old command help and add some more filesystem extensions 8 years ago
Timothy Stack 5e8d6aa3a8 [session] add hidden fields to the session
Fixes #433
8 years ago
Timothy Stack 5016ea9e71 [help] fix a help text issue 8 years ago
Timothy Stack 4cedde9a43 [help] add builtin help to the main help text as a reference
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack abd566cb08 [readline] make search tab-completion case-insensitive 8 years ago
Timothy Stack 7063c01988 [overlay] fix an crash with the overlay when the logs are from the future 8 years ago
Timothy Stack a973f7f934 [misc] some more miscellaneous bugs
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 05730274ed [prev-mark] jumping to the first bookmark wasn't always working 8 years ago
Timothy Stack aa21234164 [hist] need to rebuild hist to reflect marks
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 7033b51b41 fix potential crash when quitting 8 years ago
Timothy Stack 085ea321ea show some more preview 8 years ago
Timothy Stack bbf8bdc4ec [search-table] highlight the captured text for preview
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack aae3cf4d14 [log_vtab_manager] fix lookup_impl() 8 years ago
Timothy Stack fea3cb83d9 [sql] preview table definition
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 52d6e641c4 [build] run ldd on the generated binary 8 years ago
Timothy Stack 7e55f7401f [filter-in] highlight matches in green 8 years ago
Timothy Stack 914f4cf4bb [filter-out] show a preview of the filter effects by highlighting matches in red
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack b25a7e8b86 [build] fix path to release script 8 years ago
Timothy Stack 21f964b642 [build] zip up the travis artifact
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack df399a36a4 [docs] some more docs, command-help, and tests for #428 8 years ago
Timothy Stack 22d8257c03 [jsonlog] convert integer level to string and then apply the level patterns 8 years ago
Timothy Stack 3e97c737c1 [jsonlog] fix some bugs related to json logs 8 years ago
Timothy Stack 240d71246c [travis] try to publish builds on github
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 04e60fd79d [build] sign warnings 8 years ago
Timothy Stack 775107e630 [data_parser] use after free 8 years ago
Timothy Stack daf9c5d4d6 [grep_proc] uninitialized value 8 years ago
Timothy Stack 0a2ab5d61d [rl_highlighter] fix a use-after-free 8 years ago
Timothy Stack 545b2f4ace [docs] add help for CAST and fix a couple of glitches
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 851bd183b3 [perf] some performance tweaks 8 years ago
Timothy Stack 2f44f1e861 [ptime] add %N time format for nanoseconds 8 years ago
Timothy Stack 78119dc9f1 fixing some minor issues
Fixes #255
8 years ago
Timothy Stack 4954817741 [crash] pressing i/I when not in the log view
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 00ebd10d71 [cmds] do a dry-run of a command to check for errors
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 4f823f8d6f [build] don't pass hints to getaddrinfo 8 years ago
Timothy Stack 411ea1fbee [help] show help text for SQL functions
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack cd76eae5b8 [build] convert some C files to C++
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 6fcfd35395 [sql] add "search" column to the lnav_views table
Fixes #388
8 years ago
Timothy Stack 0797d054d9 [build] missing include 8 years ago
Timothy Stack 8776f6a703 [sql] do some minimal parsing/annotation of SQL statements
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 0b157ff867 [sql] add function adapter template
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack c0684a97cc [sql] add a regexp_capture tablue-valued function
Fixup the release makefile a bit.
8 years ago
Timothy Stack 7ba0cf2cd3 [sql] try to fix issue with eponymous tables on older sqlite versions 8 years ago
Timothy Stack 8e3eb41362 [build] fix some types 8 years ago
Timothy Stack fa296fca1b [listview] get a batch of rows from the source instead of a single one at a time
Also: bump to c++14 and added a helper template for creating sqlite virtual tables
8 years ago
Benny Zlotnik ffbe0e477c Update the Vdsm log configuration to support the Vdsm 4.1 log format 8 years ago
Timothy Stack 8a045243aa fix a naming issue in the parse overlay 8 years ago
Timothy Stack 8bf6bf1a65 [cmds] add the format directory to the PATH in the :pipe commands 8 years ago
Timothy Stack 09111fb3c9 [sql_util] compile to prepared statements
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 32c9dacd0a [files_vtab] add a vtable for opened files
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 9e7c30f00a [views_vtab] top_time crash 8 years ago
Timothy Stack c180c44e49 [vtab] add an lnav_view_stack table to get programmatic access to the view stack
More progress towards #377
8 years ago
Timothy Stack 0e27841c27 fix numeric value indexes 8 years ago
Timothy Stack 0a7816e245 [config] missed the terminator json_path_handler() 8 years ago
Timothy Stack 3fed519d0c missed filling out the numeric value indexes for patterns 8 years ago
Timothy Stack 71aa54ad4d [keymap] convert more hotkeys to keymaps
Fixes #416
8 years ago
Timothy Stack d12769cd70 minor doc fix 8 years ago
Timothy Stack 1a87184c82 [log] allow parts of log messages to be hidden
Fixes #412
8 years ago
Timothy Stack 34d1422b76 [highlight] only highlight keywords in text files
Fixes #408
8 years ago
Timothy Stack c606e1169c only do custom keys in paging mode 8 years ago
Timothy Stack 89f8ef9c2b [hotkeys] hotkey configuration
First steps to implementing #350
8 years ago
Timothy Stack 04eda90244 [db] missed checking for a null progress callback
Fixes #404
8 years ago
Timothy Stack 69e51d68d3 [hotkeys] make 'I' stable
Fixes #393
8 years ago
Timothy Stack 0138d13297 [cmds] execute scripts from stdin/fds
Issues mentioned in #397
8 years ago
Timothy Stack a69d4c37a4 [hotkey] when scanning through search hits, move to the last hits 8 years ago
Timothy Stack d799cc227e some tweaks to these changes 8 years ago
Timothy Stack e286534cfc Merge branch 'fix-compile-warnings' of https://github.com/aspiers/lnav into aspiers-fix-compile-warnings 8 years ago
Timothy Stack bc91a8e281 [log-view] show search hits in the left file line with a reverse-video marker
If the search-hit is past the right side of the screen (as mentioned in #394)
we should try to make that more obvious by adding a highlight on the left.
8 years ago
Timothy Stack f567aafe3b [c++11] migration #1
Just a start
8 years ago
Timothy Stack 44d93dddc3 [pretty-print] allow formats to do transforms before pretty-printing
Also started upgrading to C++11.

Fixes #353
8 years ago
Timothy Stack 02bfd5846b [hotkey] the n/N keys will now move to the next cluster of search hits, up to a screenful
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 95fe6f0d73 [hotkey] the n/N keys will now move to the next cluster of search hits, up to a screenful
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 09292fc23e remove -s flag
Fixes #363
8 years ago
Timothy Stack 642a94e7b7 [open] check for FIFOs
Fixes #380
8 years ago
Timothy Stack a7a03470d7 [search] fix a typo in the timeval compare operator
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 4de576fba7 [search] after a search has been entered, move to the first hit if one is found quickly
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Adam Spiers baa4ec0eb2 add two more common time formats
Since 26cd9f59 introduced stricter timestamp parsing so that
the full string now has to be matched, several of the 3rd party
formats installable via "lnav -i extra" broke.  So add a couple
more very common timestamp formats to address these.
8 years ago
Adam Spiers fb96e948e2 fix -Wunused-result warning when calling getcwd()
Fix this warning:

    lnav_log.cc: In function ‘void log_host_info()’:
    lnav_log.cc:185:29: warning: ignoring return value of ‘char* getcwd(char*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
         getcwd(cwd, sizeof(cwd));
                                 ^
8 years ago
Adam Spiers 81f5a843cf check return value of git pull command
This is obviously worthwhile, but also eliminates this compiler warning:

    lnav.cc: In function ‘int main(int, char**)’:
    lnav.cc:2407:33: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
                     system(pull_cmd);
                                     ^
8 years ago
Adam Spiers 04627c1743 fix -Wunused-result warnings when calling read() and write()
Fix warnings like these:

    lnav.cc: In function ‘int main(int, char**)’:
    lnav.cc:2407:33: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
                     system(pull_cmd);
                                     ^
    lnav.cc:2966:66: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
                         write(STDOUT_FILENO, str.c_str(), str.size());
                                                                      ^
    lnav.cc:2967:50: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
                         write(STDOUT_FILENO, "\n", 1);
                                                      ^
8 years ago
Adam Spiers dc500774a8 fix -Wsign-compare warnings in lnav_commands.cc
Fixes these warnings:

    lnav_commands.cc: In function ‘std::string remaining_args(const string&, const std::vector<std::basic_string<char> >&, size_t)’:
    lnav_commands.cc:67:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int lpc = 0; lpc < index; lpc++) {
                                 ^
    lnav_commands.cc: In function ‘std::string com_save_to(std::string, std::vector<std::basic_string<char> >&)’:
    lnav_commands.cc:574:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int lpc = 0; lpc < dls.text_line_count(); lpc++) {
8 years ago
Adam Spiers 961cac8ec0 fix sscanf %qd type mismatch warning
Fixes this warning:

    relative_time.cc: In member function ‘bool relative_time::parse(const char*, size_t, relative_time::parse_error&)’:
    relative_time.cc:222:62: warning: format ‘%qd’ expects argument of type ‘long long int*’, but argument 3 has type ‘int64_t* {aka long int*}’ [-Wformat=]
                         if (sscanf(numstr.c_str(), "%qd", &number) != 1) {
                                                                  ^
8 years ago
Adam Spiers 2aebf4f381 fix -Wunused-result warnings when calling write()
Fix these warnings:

papertrail_proc.hh: In constructor ‘papertrail_proc::papertrail_proc(const string&, time_t, time_t)’:
papertrail_proc.hh:107:36: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
                  this->ptp_api_key);
                                    ^
papertrail_proc.hh: In member function ‘void papertrail_proc::set_url()’:
papertrail_proc.hh:146:47: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
                  this->ptp_quoted_search.in());
8 years ago
Adam Spiers 7988200701 fix -Wunused-result warnings when calling asprintf()
Fix these warnings:

papertrail_proc.hh: In constructor ‘papertrail_proc::papertrail_proc(const string&, time_t, time_t)’:
papertrail_proc.hh:107:36: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
                  this->ptp_api_key);
                                    ^
papertrail_proc.hh: In member function ‘void papertrail_proc::set_url()’:
papertrail_proc.hh:146:47: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
                  this->ptp_quoted_search.in());
8 years ago
Adam Spiers 43ac6366cb fix -Wformat time_t warnings (#368)
Fix warnings like:

    ptimec.hh: In function ‘void ftime_i(char*, off_t&, ssize_t, const exttm&)’:
    ptimec.hh:387:57: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
         snprintf(&dst[off_inout], len - off_inout, "%lld", t);
                                                             ^

In this case we know that the `t` returned by `tm2sec` is a number of
seconds, so a long should be long enough, and anyway there is already
code checking for overflow.

Fixes #368.

https://github.com/tstack/lnav/issues/368
8 years ago
Adam Spiers 0559a98f91 fix -Wsign-compare warnings (#369)
Fix repeated errors like this:

    log_format.hh:1138:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if (len < jfe.jfe_min_width) {

Fixes #369.

https://github.com/tstack/lnav/issues/369
8 years ago
Timothy Stack 26cd9f5930 [ptime] make sure the full time stamp is matched
Fixes #389
Fixes #390
8 years ago
Timothy Stack 592ee60693 [log] fix rewriting machine-oriented timestamps
Fixes #371
8 years ago
Adam Spiers c18adb8b73 fix hints about moving by hour
o/O do not move forward/backward an hour; in fact, no hotkey does,
but 6/^ are about as close as it gets.
8 years ago
Adam Spiers 41acc7f249 group keybindings in built-in help text
Group them in roughly the same way as in the manual.  This makes
it a lot easier to locate a key binding more quickly.
8 years ago
Adam Spiers c354295c92 increase emphasis of level 1 heading underlines
This will allow us to introduce level 2 headings underlined by the
hyphen character.
8 years ago
Timothy Stack d8a49ec737 actual fix for json fields 8 years ago
Timothy Stack a758056657 Revert "need to check level before incrementing line count"
This reverts commit c0cd26dec4.
8 years ago
Timothy Stack c0cd26dec4 need to check level before incrementing line count 8 years ago
Timothy Stack 4c0a8d0376 [ptime] need to clear the zone from the base when using a custom time format 8 years ago
Timothy Stack b296e84a65 [format] color extra json fields that are identifiers 8 years ago
Timothy Stack a59e0b290e [format] allow json log fields to be hidden
Fixes #303
8 years ago
Timothy Stack b392886f0c [highlight] choose highlight color based on the regex
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack 9f79dcc31a [format] point out the location of a pcre-compile error
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago