Compare commits

...

421 Commits

Author SHA1 Message Date
Tim Stack 8acb688693
Merge pull request #1077 from tstack/dependabot/bundler/docs/nokogiri-1.13.9
Bump nokogiri from 1.13.8 to 1.13.9 in /docs
2022-10-31 11:01:40 -07:00
dependabot[bot] a36c99cb73
Bump nokogiri from 1.13.8 to 1.13.9 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.8 to 1.13.9.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.8...v1.13.9)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-31 17:05:11 +00:00
Tim Stack cb55f588ec [themes] add missing scrollbar style
Fixes #1074
2022-10-31 09:35:01 -07:00
Tim Stack 33f0cc51b9 [site] fix download links 2022-10-11 13:07:39 -07:00
Tim Stack d36bb61f3e [release] final version bumps 2022-10-10 20:49:05 -07:00
Timothy Stack 48798076c1 [release] update tag 2022-10-10 20:12:58 -07:00
Tim Stack 8391de3ad6 [data_scanner] fix DT_H1 detection
Fix a broken refactor
2022-10-06 21:02:33 -07:00
Tim Stack 016bca01db [release] pull before doing osx build 2022-10-06 10:53:35 -07:00
Tim Stack f4e67df114 [release] bump sqlite version 2022-10-06 09:12:29 -07:00
Tim Stack 057be8c66d [lint] fix some coverity/clang-tidy issues 2022-10-05 12:28:29 -07:00
Tim Stack faeaf477ab [yajlpp] flesh things out a bit more 2022-10-04 21:17:01 -07:00
Tim Stack 468358a358 [port] one more endianness change 2022-10-03 21:19:03 -07:00
Tim Stack 3b1233be8f [port] hopefully the last endian issue 2022-10-03 11:32:15 -07:00
Tim Stack 9ff1daf032 [port] more endianness stuff 2022-10-03 06:19:07 -07:00
Tim Stack 5a70e62003
Merge pull request #1068 from sureshsundriyal/endianness
[Endianness] Make SpookyHash endianness-agnostic.
2022-10-03 06:13:01 -07:00
Tim Stack 9eb734ef7e [log_format] support for a separate sub-second field 2022-10-02 21:58:10 -07:00
Suresh Sundriyal 071ec72586 [Endianness] More code to make Spookyhash endianness-agnostic. 2022-10-01 15:51:03 -07:00
Suresh Sundriyal e2cddf28b2 [Endianness] Make SpookyHash endianness-agnostic.
Try and make SpookyHash endianness-agnostic using macros copied from:
https://github.com/k0dai/spookyhash
2022-10-01 11:23:17 -07:00
Tim Stack e135cf3334 [result] try to fix type conversion on s390x 2022-09-30 22:20:44 -07:00
Tim Stack 1a92701cb3 [keymaps] update docs/etc for swedish keymap 2022-09-30 15:42:07 -07:00
Tim Stack e1e6ca30eb
Merge pull request #1067 from FaffeF/swedish-keyboard
Swedish keymap
2022-09-30 15:36:53 -07:00
Fredrik Forsell 59f3af535d Delete missing keymap from keymaps.am 2022-09-30 23:32:34 +02:00
Fredrik Forsell e310a18d7c Move mac specific binding to main sv keymap 2022-09-30 19:14:07 +02:00
Tim Stack f7b067db42 [ryml] remove unnecessary include that is triggering a compile error on some archs 2022-09-30 05:29:19 -07:00
Fredrik Forsell 8f8be6fd20 Clean up defaults, add mac layout
Remove items that are the same as the default keymap

Adds a Swedish Mac layout because shift-4 is not the same as on a
Windows keyboard
2022-09-30 01:37:05 +02:00
Fredrik Forséll 91a03b7b86
Update keymaps.am to include Swedish layout 2022-09-29 19:17:13 +02:00
Fredrik Forséll 6aba246bf3
Create keymap for Swedish keyboard layout
Avoids problems with shift-numbers etc
2022-09-29 19:13:32 +02:00
Tim Stack e1f52dd6e2 bump version in conanfile 2022-09-28 09:32:19 -07:00
Tim Stack b86d272c29 [view_curses] remove fallback arg in to_attrs() 2022-09-27 22:10:59 -07:00
Tim Stack bddc6011ff [ansi] fix perf bug in eraser
Related to #1057
2022-09-26 10:31:04 -07:00
Tim Stack 45b812d063 [docs] add refs to the vscode extension 2022-09-25 13:52:03 -07:00
Tim Stack 5b34b3a604 [NEWS] update news for non-JSON-lines change 2022-09-24 21:26:16 -07:00
Tim Stack 07c57dae08 [json-log] change how lines that do not start with a curly are reported 2022-09-24 21:19:20 -07:00
Tim Stack d19eace826 [blog] post about the vscode extension 2022-09-24 13:09:06 -07:00
Tim Stack 094b45f7ca [nits] minor fixes 2022-09-23 11:08:22 -07:00
Timothy Stack 1627698168 [build] fix static lib name for pcre2 2022-09-23 09:29:28 -07:00
Tim Stack 2694a9855a [release] try beta1 release 2022-09-23 06:12:07 -07:00
Tim Stack 75fd859c6f [appveyor] turn off parallel compilation 2022-09-22 16:22:15 -07:00
Tim Stack d11b90bc6f [build] try to fix win build 2022-09-22 15:46:12 -07:00
Tim Stack 871ad1ad12 [dist] missed cleaning some files 2022-09-22 12:58:11 -07:00
Tim Stack a31045a97b [build] fix dist listing in test 2022-09-22 12:27:14 -07:00
Tim Stack 0fd9845580 [tests] test_tailer tweaks 2022-09-22 10:54:09 -07:00
Tim Stack fd19759bf5 [tests] set TZ when doing touch 2022-09-21 22:47:46 -07:00
Tim Stack df0d3aed0c [tidy] use auto_sqlite3 type alias 2022-09-21 21:34:04 -07:00
Tim Stack 7b84530e87
Merge pull request #1063 from tstack/dependabot/bundler/docs/commonmarker-0.23.6
Bump commonmarker from 0.23.5 to 0.23.6 in /docs
2022-09-21 21:14:56 -07:00
dependabot[bot] d7db3d6e9b
Bump commonmarker from 0.23.5 to 0.23.6 in /docs
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.5 to 0.23.6.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.5...v0.23.6)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-22 04:13:55 +00:00
Tim Stack 7f513b2d1f [tidy] fixing some uninit issues 2022-09-21 21:06:04 -07:00
Tim Stack 93a53c4224 [fini] fix a destruction ordering issue 2022-09-21 18:54:45 -07:00
Tim Stack 59ec0b4794 [build] missed dist'ing test file 2022-09-20 20:52:20 -07:00
Tim Stack 01d8ee0232 [appveyor] set image 2022-09-20 20:45:28 -07:00
Tim Stack 4ecbee5162 [appveyor] disable sig check 2022-09-20 20:40:50 -07:00
Tim Stack 1249233ca1 [appveyor] try without mirror 2022-09-20 20:36:48 -07:00
Tim Stack cda76010d0 [appveyor] try a different mirror 2022-09-20 20:24:41 -07:00
Tim Stack 2d03597487 [appveyor] use https for mirror 2022-09-20 20:23:23 -07:00
Tim Stack d940d9d5eb [logfile] plumb gzip header through file meta 2022-09-20 20:07:44 -07:00
Tim Stack 3f3e6dcbdc [highlight] turn off nesting for var highlight 2022-09-20 13:51:56 -07:00
Tim Stack a437d9fcc9 [pcre2pp] allocate match_data on the stack 2022-09-20 08:31:23 -07:00
Tim Stack d7e79b014d [NEWS] mention scrubbing of ANSI escapes 2022-09-20 08:31:23 -07:00
Tim Stack 26bcf0865d [test] tests should not rely on the local syslog being readable 2022-09-20 08:31:23 -07:00
Tim Stack 5ae2c7dbe7
Merge pull request #1062 from TobiX/gitlab-clf
Handle empty referer in access log (fixes #1059)
2022-09-20 08:04:41 -07:00
Tobias Gruetzmacher 0958a9b189
Handle empty referer in access log (fixes #1059)
It seems most web servers log an empty referer as `"-"`, but GitLab's
nginx actually logs an empty field instead (`""`). Allow this in the
standard CLF format parser.
2022-09-20 16:34:25 +02:00
Tim Stack 20a06a2782 [test] missed input file 2022-09-19 21:15:28 -07:00
Tim Stack b7de0766c8 [highlighters] add some keywords 2022-09-19 20:42:48 -07:00
Tim Stack f1deeb5b74 [highlight] turn off nesting for some builtin highlighters 2022-09-19 20:30:56 -07:00
Tim Stack e0ecbdff10 [logfile] improve handling of ansi escapes
I think this covers the rest of the functionality
that needs to deal with ansi escapes.

Related to #1057
2022-09-19 20:15:35 -07:00
Tim Stack 9185518bda [top_status_source] try to fix prepared_stmt destruct order 2022-09-19 09:13:01 -07:00
Tim Stack 5060b38f99 [db] avoid reusing the same chart colors
This just covers the basic case and doesn't address reuse
with JSON values.

Related to #1047
2022-09-19 02:25:26 -07:00
Tim Stack 1faa95df94 [readme] mention running autogen.sh in the regular README 2022-09-19 01:53:47 -07:00
Tim Stack 81fc0dc47e [tidy] remove duplicate struct names
Fixes #1004
2022-09-19 01:50:54 -07:00
Tim Stack b2abf94c2e [data_scanner] fix performance regression
Related to #1057
2022-09-19 01:37:59 -07:00
Tim Stack d79c1f9235 [regex101] accept pcre2 imports 2022-09-18 22:37:44 -07:00
Tim Stack 2ad379c454 [am] remove aminclude_static.am 2022-09-18 22:10:03 -07:00
Tim Stack 6016219d57 [tests] missed updating test output 2022-09-18 20:47:30 -07:00
Tim Stack 502c3b5f20 [sql] tweaks to parse_url() 2022-09-18 20:42:05 -07:00
Tim Stack c49e0787f3 [release] bump version and try to automate some stuff 2022-09-18 16:05:24 -07:00
Tim Stack 4445781038 [release] move NEWS to NEWS.md 2022-09-18 07:41:12 -07:00
Tim Stack 1effd99e5c [sql] add parse_url()/unparse_url() functions
Fixes #44
2022-09-18 06:51:04 -07:00
Tim Stack b536043050 [sql/json] json_group_array() returns {} instead of [] 2022-09-16 13:02:52 -07:00
Tim Stack 116b40f28c [bottom_status] fix out-of-bounds when with word-wrap
Related to #1058
2022-09-16 11:20:15 -07:00
Tim Stack bfa8ae2c42 [test] try to fix anon test 2022-09-15 23:35:54 -07:00
Tim Stack 01fe042a84 [build] try to fix link issue 2022-09-15 22:19:32 -07:00
Tim Stack 506d569b2f [build] missing include 2022-09-15 21:49:23 -07:00
Tim Stack bf3fe7fc2c [text] add some missing bound check on the filtered line index for the TEXT view
Fixes #1056
2022-09-15 21:22:11 -07:00
Tim Stack eb0bd4ac9a [anon] add an anonymizer to help with support requests
Fixes #1055
2022-09-15 21:11:30 -07:00
Tim Stack fadcea4403 [final] fix sqlite cleanup bug 2022-09-15 06:27:28 -07:00
Tim Stack 740b827901 [logfile] handle logs with ANSI escapes
This is a partial fix for handling ANSI escapes in
parts of log messages that would prevent regexes
from matching.  Still more work to do.

Related to #1057
2022-09-14 21:43:36 -07:00
Tim Stack 8613ad4d47 [demo] bump version 2022-09-14 18:57:54 -07:00
Tim Stack 2c5aaca254 [demo] log stuff 2022-09-14 18:50:00 -07:00
Tim Stack f0b173b0af [snap] fix pcre2 lib name 2022-09-12 14:36:33 -07:00
Tim Stack 38c10017ee [snap] add pcre2 lib 2022-09-12 13:52:34 -07:00
Tim Stack eaa6e50a52 [log_format] perform more validations on log formats 2022-09-12 07:18:26 -07:00
Tim Stack af5213a98a [log_formats] change "no patterns have a capture" error to a warning 2022-09-10 15:43:47 -07:00
Tim Stack 132bd0adba [log_format] check for null 2022-09-10 10:48:52 -07:00
Tim Stack 664f45f641 [build] check for sqlite3_drop_modules
Fixes #1053
2022-09-10 10:37:04 -07:00
Tim Stack b2b300c7c8 [build] install pcre2 libs 2022-09-10 09:48:42 -07:00
Tim Stack 5a63ece31d [pcre2] migrate from pcre to pcre2
Fixes #974
2022-09-10 09:28:07 -07:00
Tim Stack ca4e61ba02
Merge pull request #1042 from trantor/coloring_fix
[view_curses] Fix for fg colour and reverse attribute for separator bars
2022-09-04 14:51:36 -07:00
Fulvio Scapin 4b7c9ef54c [view_curses] Fix for fg colour and reverse attribute for separator bars
Elements of type VC_GRAPHIC used as column separators, when used
along with background coloured bars to express numeric column values,
maintain alternate-line reversing of colours when inside the bar range
and take the foreground color of the last coloured bar on the line even
though are not placed in the coloured range of characters.
This commit fixes this.
2022-09-04 23:36:17 +02:00
Tim Stack aee33d6929
Merge pull request #1041 from bowlofeggs/build-remote-when-needed
Only build ssh keys when needed
2022-09-04 14:09:00 -07:00
Tim Stack 66ec8e553e [build] fix static var issue 2022-09-04 07:13:32 -07:00
Tim Stack 6ca01cd934 [line_buffer] fix some long-line handling 2022-09-04 06:38:39 -07:00
Randy Barlow b16833392b
Only build ssh keys when needed
I believe the test/remote folder only needs to be setup for
test/test_remote.sh. Prior to this commit, it was being built during
make, rather than just during make check. This commit adjusts things so
that the test/remote folder is only generated during make check, and
only when test/test_remote.sh is being executed.

Fixes #1040

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
2022-09-04 00:03:33 -04:00
Tim Stack 7309352c97 [view_curses] add a unit type to line_range
Fixes #1033
2022-09-03 08:49:47 -07:00
Tim Stack a813482a54 [log_formats] JSON number time to local time zone
Fixes #1038
2022-09-02 23:06:03 -07:00
Tim Stack 2b1a8e4622 [.github] fix version number in issue template 2022-09-02 10:32:25 -07:00
Tim Stack 7a3f4dbeaa [snap] add favicon 2022-09-02 00:13:43 -07:00
Tim Stack f8e3417c62 [site] sigh... didn't notice it was .1 instead of .0 2022-09-01 23:54:39 -07:00
Tim Stack 94fa27ead8 [site] bump release version 2022-09-01 23:52:09 -07:00
Tim Stack 679e9f0771 [build] try to fix brew build error 2022-09-01 21:46:59 -07:00
Tim Stack bea4fe5b3d [snap] fix config param name 2022-09-01 21:25:17 -07:00
Tim Stack ca51854e89 [build] turn on optimizations for snap build and fix dist 2022-09-01 21:16:28 -07:00
Tim Stack ac398dd441 [site] add links to playground / tutorial 2022-09-01 15:15:01 -07:00
Tim Stack e047386441 [sql] extract() assumed too much about elements 2022-09-01 14:33:51 -07:00
Tim Stack c9ec288853 [regexp_vtab] hex floats were being passed through to json, which does not support hex floats
It looks like sscanf("%f") was accepting hex-floats. So, lnav
was passing that through to the JSON, which does not like hex
floats.

FYI, @trantor, this should fix the regexp_capture_into_json()
issue of hex numbers being passed through.
2022-09-01 07:32:51 -07:00
Tim Stack 84d2f56189 [formats] add / to pattern in unifi 2022-08-31 21:31:44 -07:00
Tim Stack 8d6780e089 [ptimec_rt] restore '%a' handling 2022-08-31 09:27:59 -07:00
Tim Stack eb403f540f [text_format] recognize .markdown extension 2022-08-31 09:27:46 -07:00
Tim Stack 72d171ae4b [tests] add a regexp_capture() test 2022-08-30 22:28:12 -07:00
Tim Stack 8e33c599f1 [regexp_vtab] match_index should reset for the next log line 2022-08-30 21:39:35 -07:00
Tim Stack a6cbed6162 [playground] make links in the sample markdown real to keep the action from complaining 2022-08-30 21:16:10 -07:00
Tim Stack d8ae7053e6
Merge pull request #1031 from trantor/patch-1
Indentation correction in formats.rst
2022-08-30 17:03:39 -07:00
Fulvio Scapin cad1d80be3
Indentation correction in formats.rst
Indentation correction in the formats.rst file
2022-08-31 01:44:30 +02:00
Tim Stack 84536d804c [demo] add playground 2022-08-30 16:11:37 -07:00
Tim Stack cc598e3ae6 [site] exclude tutorials directory 2022-08-30 14:03:55 -07:00
Tim Stack f0d9ab5f40 [tutorial] revert debugging change to timeout 2022-08-30 13:54:11 -07:00
Tim Stack c69b398944 [tutorial] add more steps to the first tutorial 2022-08-30 13:23:15 -07:00
Tim Stack 1f24ab3074 [leak] fix leak of pcrepp object 2022-08-29 22:07:05 -07:00
Tim Stack 7a1ade581a [db] fix leaked db connection 2022-08-29 21:53:20 -07:00
Tim Stack b5cb38d454 [user_notifications] treat message as markdown 2022-08-29 16:00:33 -07:00
Tim Stack ff91cfc3a0 [tutorial] some more nits 2022-08-29 10:22:23 -07:00
Tim Stack 915f583ab0 [cmake] add missing time format 2022-08-29 09:37:58 -07:00
Tim Stack fa0050be84 [demo] set a timeout of 5 minutes for the first tutorial 2022-08-29 09:37:42 -07:00
Tim Stack 311798e1f8 [main] try to fix cleanup of sqlite 2022-08-29 09:21:19 -07:00
Tim Stack cebc867c6b [cmds] reduce next/prev mark errors to info to make them less noisy 2022-08-29 02:54:31 -07:00
Tim Stack e90fe620c9 [release] add ncurses-dev to musl build 2022-08-29 01:18:50 -07:00
Timothy Stack 220317eb16 [demo] build/deploy stuff for ssh-based demo
fix structure name clash
2022-08-28 23:07:55 -07:00
Tim Stack 4b307b5b4f [build] missed new file 2022-08-28 19:41:56 -07:00
Tim Stack 5e6ac10663
Fix tutorial link 2022-08-28 19:08:06 -07:00
Tim Stack 87791ec94b [markdown] add support for going to an anchor 2022-08-28 18:55:32 -07:00
Tim Stack fd956c66d3 [field_overlay] fix known key size when there's a prefix 2022-08-26 07:39:04 -07:00
Tim Stack d01db38d51 [init] fix handling of unknown TERM 2022-08-22 13:15:31 -07:00
Tim Stack 5751fe89c4 [markdown] recognize more code fence langs 2022-08-21 22:02:46 -07:00
Tim Stack 0d1304e8ec [ansi_scrubber] fix handling of invalid utf 2022-08-21 21:15:37 -07:00
Tim Stack ebaeb43fcb [docs] mention out-of-time-order highlight
Fixes #1000
2022-08-21 18:47:44 -07:00
Tim Stack a2c35140ba [data_scanner] hack to recognize some windows paths
Fixes #1018
2022-08-20 21:23:42 -07:00
Tim Stack 23ab1abd73 [data_scanner] tweaks to fix slow build times and a couple warnings 2022-08-20 21:01:15 -07:00
Tim Stack 7310f9dcec [formats] add description and level properties to tag definitions 2022-08-20 06:41:44 -07:00
Tim Stack 412a3c2a70 [formats] restrict tag name characters 2022-08-19 21:15:59 -07:00
Tim Stack 53c9c5cb51 [logfile] move bookmark_metadata to logfiles 2022-08-19 20:01:25 -07:00
Tim Stack ad1897ba15 [field-overlay] display the timestamp format 2022-08-18 21:32:51 -07:00
Tim Stack 5abd483029 [ansi_scrubber] handle unicode in overstrike code 2022-08-18 16:09:45 -07:00
Tim Stack 9c8cc04a99 [cmds] :goto was not handling timestamps with spaces 2022-08-18 13:27:49 -07:00
Tim Stack 8e734eaf07 [cover] remove some dead code 2022-08-17 16:15:02 -07:00
Tim Stack af75f7bd80 [tests] updated expected output for readme change 2022-08-17 13:34:10 -07:00
Tim Stack ceb1779f9f [readme] more support links 2022-08-17 13:11:57 -07:00
Tim Stack b70fa47b6d [readme] add discord link 2022-08-17 13:08:16 -07:00
Tim Stack 31bd108bf2 [site] add discord link 2022-08-17 11:28:58 -07:00
Tim Stack c50b0a20a8 [site] fix front page screenshot size 2022-08-17 09:48:05 -07:00
Tim Stack 839dfe0c1b [site] update front page image 2022-08-17 09:27:46 -07:00
Tim Stack 74c2237296 [loader] add some help text to the error for values without a corresponding capture 2022-08-16 22:39:24 -07:00
Tim Stack 001f26d066 [loader] make sure values defined in formats have a corresponding capture in at least one pattern 2022-08-16 21:38:17 -07:00
Tim Stack 072fad4173 [tests] coverage for json SQL funcs 2022-08-16 20:46:23 -07:00
Tim Stack 35a8e99c07 [tests] coverage for some state functions 2022-08-16 20:28:03 -07:00
Tim Stack 88d9002a5d [search-table] add test case 2022-08-16 14:51:08 -07:00
Tim Stack d020168860 [meta] highlight comments/tags in searches 2022-08-15 22:32:28 -07:00
Tim Stack a1de8f1fc1 [search-table] fix clearing of message data 2022-08-15 21:45:31 -07:00
Tim Stack 7ef5cf6ba3 [session] some more session docs 2022-08-13 21:42:41 -07:00
Tim Stack 0603b1e756 [session] support for :hide-file and some related fixes 2022-08-13 07:31:46 -07:00
Tim Stack 13f161d21e [build] fix some warnings 2022-08-12 22:07:33 -07:00
Tim Stack c824b64840 [filter] fix a case where top time was not maintained when a filter was applied 2022-08-11 21:03:45 -07:00
Tim Stack 270d44c6b4 [remote] fix handling of absolute symlinks 2022-08-11 12:40:36 -07:00
Tim Stack f73e71cf30 [perf] issues with matching filenames and ansi scrubbing 2022-08-11 11:16:49 -07:00
Tim Stack 1e63cfc5ae [lss] fix issue with crumbs 2022-08-11 08:55:59 -07:00
Tim Stack 1c440ecb6f [release] bump lib versions 2022-08-11 07:18:43 -07:00
Tim Stack d9e699fd09 [docs] add docs for new SQL tables 2022-08-11 00:15:18 -07:00
Tim Stack 061e3690de [build] fix 32-bit build 2022-08-10 15:08:12 -07:00
Tim Stack ca7efa822f [spectro] show DB overlay and handle values in an empty range 2022-08-10 14:37:49 -07:00
Tim Stack ebe2e0d8e6 [docs] add config panel screenshots 2022-08-10 10:39:25 -07:00
Tim Stack 1fd274ce24 [docs] some more updates to docs
Also, add support for overstruck/backspace-underscore for
doing bold/underline.
2022-08-08 23:14:02 -07:00
Tim Stack c52615c424 [docs] start updating screenshots 2022-08-07 10:00:34 -07:00
Tim Stack 3df07139b3 [line_buffer] fix long line issue
Fixes #980
2022-08-06 13:46:50 -07:00
Tim Stack 4e74491e84 [blog] post about markdown support 2022-08-06 02:11:37 -07:00
Tim Stack deb0e21554 [tests] fix export session test 2022-08-05 22:23:19 -07:00
Tim Stack bbedca5940 [export-session] add missing line-feeds 2022-08-05 22:17:55 -07:00
Tim Stack 01405ffbd6 [log-crumbs] turn off semantic highlights for crumbs 2022-08-05 16:15:59 -07:00
Tim Stack 1832303bde [lo-fi] try to maintain the position of lines on the display
Fixes #815
2022-08-05 16:09:54 -07:00
Tim Stack b829b6ddde [blog] add a post about error message improvements 2022-08-05 13:07:12 -07:00
Tim Stack 8941f28c3e [time_util] cap large year in tm2sec() instead of returning BAD_DATE 2022-08-04 21:55:03 -07:00
Tim Stack c5d11f36e1 [logfile] need to flush the buffer for single line files as well 2022-08-04 14:57:01 -07:00
Tim Stack 3ade11a449 [remote] clear file error on reconnect
Fixes #940
2022-08-04 14:41:41 -07:00
Tim Stack 7077495389 [crash] missed expanding the alt buffer in line_buffer 2022-08-04 09:23:40 -07:00
Tim Stack 4e0dab843a [session] try avoid using absolute file paths in session exports 2022-08-04 09:22:09 -07:00
Tim Stack 1c793f6f28 [remote] notify main when desired paths are initially synced
Need to wait for remote paths referenced by sessions to be
synced before progressing.
2022-08-03 23:01:38 -07:00
Tim Stack c5b8bd0ba4 [ui] handle resizes during sql execution
Also, fix reporting of init command errors
2022-08-03 16:05:37 -07:00
Tim Stack a4fadb56f6 [build] missed new textfile 2022-08-03 14:19:54 -07:00
Tim Stack 7c3df44fc4 [pretty] handle ANSI escapes
Fixes #1020
2022-08-03 13:46:36 -07:00
Tim Stack 056754a926 [session] some improvements to session export 2022-08-03 10:55:18 -07:00
Tim Stack c6d7206a1e actually remove the flag 2022-08-03 07:18:59 -07:00
Tim Stack ab3f01bbf5 [config] GLOB_BRACE is not supported in musl 2022-08-03 07:12:09 -07:00
Tim Stack 5259da4f4f [highlights] reprioritize highlighters to prefer formats over themes
Fixes #992
2022-08-03 06:48:59 -07:00
Tim Stack bdacaa6f86 [stdin] fix handling of stdin piper
Fixes #1011
2022-08-02 22:21:44 -07:00
Tim Stack 010198531b [tests] some coverage for blobs 2022-08-02 21:18:05 -07:00
Tim Stack 7b32ea9d39 [logfile] fix handling of partial lines 2022-08-02 16:03:39 -07:00
Tim Stack df082eaf16 [highlighter] fix string range for pcrepp input 2022-08-02 15:00:41 -07:00
Tim Stack 363eb35da3 [pcrepp] handle defined capture groups
Fixes #1013
2022-08-02 13:38:43 -07:00
Tim Stack 3cafcf3c77 [attr_line] tweak shifting of attributes
Fixes #1017
2022-08-02 11:25:19 -07:00
Tim Stack 40037b0fd1 [highlight] for format highlights, only set semantic color if nothing else is specified
Fixes #1016
2022-08-01 19:30:03 -07:00
Tim Stack d22727242a [formats] pickup old macos syslog format 2022-08-01 15:16:00 -07:00
Tim Stack 9675eb5902 [build] fix cmake build 2022-08-01 15:15:48 -07:00
Tim Stack 1ae1600f7b [line_buffer] cache compressed files 2022-08-01 14:56:48 -07:00
Tim Stack c17046b2fa [formats] fix error message if pattern does not fully match sample 2022-07-31 22:00:25 -07:00
Tim Stack e2e491ec41 [search-table] improve preview highlighting 2022-07-31 07:44:22 -07:00
Tim Stack 3b9bc57ab0 [sql] consolidate the encoders to a single function 2022-07-30 13:18:55 -07:00
Tim Stack c9c573d2ad [sql] handle null in base64_encode() 2022-07-30 00:18:26 -07:00
Tim Stack 94aab91d38 [sql] add base64_encode()/base64_decode() functions 2022-07-30 00:12:44 -07:00
Tim Stack 1f8e2bd46c [sql] add uri_encode()/uri_decode() functions
Fixes #1014
2022-07-29 23:05:16 -07:00
Tim Stack be862e0eab [scn] more scnlib conversions 2022-07-29 21:58:08 -07:00
Tim Stack f234b37fe0 [build] some more scnlib stuff 2022-07-29 00:07:11 -07:00
Tim Stack 9c03938ff3 use scnlib instead of sscanf/strtod 2022-07-28 23:31:58 -07:00
Tim Stack 390bc132e2 [build] updates for arm64 2022-07-28 20:24:32 -07:00
Timothy Stack 8ef581177c [line_buffer] add some performance counters for tracking SQL perf
Also, check for keyboard input during SQL execution
so we can cancel.

Fixes #894
2022-07-27 21:49:14 -07:00
Timothy Stack 0f2d38df50 [ui/sql] the y/Y hotkey pair is no longer a thing 2022-07-25 09:23:19 -07:00
Timothy Stack a459370bd8 [tests] coverage for markdown breadcrumbs 2022-07-25 07:49:51 -07:00
Timothy Stack 16d39f3fd9 [db] move the shared_buffer_ref out of logline_value 2022-07-24 23:29:46 -07:00
Timothy Stack 66853a70ca [db] use arena allocator for db results
... and continue to tweak cylon
2022-07-23 21:42:22 -07:00
Timothy Stack ff44e37f7e [ui] make the cylon status mode actually cylon-like 2022-07-22 23:37:25 -07:00
Timothy Stack a5a02d6243 [tests] text file handling and make sure the progress status bar is updated during SQL processing 2022-07-22 22:21:16 -07:00
Timothy Stack 20165a85e7 [themes] tweaks for the top status bar 2022-07-22 21:35:01 -07:00
Timothy Stack f8aac1d52e [build] remove leftover file 2022-07-22 21:11:35 -07:00
Timothy Stack 7ed2437a01 [ux] remove redundant code for staying at the same time in lss that fixes a jump on reset 2022-07-22 21:09:19 -07:00
Timothy Stack b3ee092dc5 [cleanup] remove unused stuff and add a test 2022-07-22 15:31:08 -07:00
Timothy Stack 317f2d32cf [misc] use sqlitepp.client in lnav.events.cc 2022-07-21 23:46:45 -07:00
Timothy Stack e8f0b1e6b8 [secure-mode] some more restrictions 2022-07-21 23:30:49 -07:00
Timothy Stack 935290b521 [misc] fix some early exit issues 2022-07-21 22:10:37 -07:00
Timothy Stack 41754a8ec1 [session] add time_offset of files to session exports 2022-07-21 15:44:30 -07:00
Timothy Stack a04dc2a327 [session] improvements to :export-session-to 2022-07-21 07:28:55 -07:00
Timothy Stack 773cc3e049 [tests] add some more tests for the views vtabs 2022-07-21 06:58:01 -07:00
Timothy Stack 6712a33163 [cmds] add :export-session command 2022-07-20 22:01:17 -07:00
Timothy Stack 1abc77e129 [secure] start to update secure-mode 2022-07-19 23:48:25 -07:00
Timothy Stack 5ea55afd74 [vtab] indexing improvements 2022-07-19 22:08:07 -07:00
Timothy Stack 80bddbd2e7 [formats] some more fixes for vmw formats 2022-07-17 14:11:23 -07:00
Timothy Stack 0f9c519061 [vmw_log] update to work with hostd on esx 2022-07-17 07:47:53 -07:00
Timothy Stack 76991744e4 [snap] revert version changes 2022-07-16 21:56:20 -07:00
Timothy Stack d4f0cbd8ce [snap] update libicu version 2022-07-16 21:39:13 -07:00
Timothy Stack d98b5a5a88 [snap] try to bump to core22 2022-07-16 20:02:58 -07:00
Timothy Stack 3ac5ce1e51 [sqlite] make compatible with older sqlite 2022-07-16 16:41:21 -07:00
Timothy Stack 981a3d6b70 [build] xxhash for other arch 2022-07-16 15:52:01 -07:00
Timothy Stack 0b99c0b9a4 [tests] update json sql test for sqlite bugfix
Related to #1009
2022-07-16 08:04:32 -07:00
Timothy Stack dabd93a63a [build] distcheck fix 2022-07-15 23:15:09 -07:00
Timothy Stack 6224ed2ce3 [version] change next version to v0.11.0 since there are a bunch of changes 2022-07-15 22:31:43 -07:00
Timothy Stack 7b83b87e57 [build] fix bin2c path 2022-07-15 21:54:50 -07:00
Timothy Stack fcb4794e87 [build] change to BUILT_SOURCES 2022-07-15 21:48:30 -07:00
Timothy Stack 45270505e3 [status] some more user notification tweaks 2022-07-15 21:41:47 -07:00
Timothy Stack f5cc4b298f [ui] add back top status bar 2022-07-14 22:32:38 -07:00
Timothy Stack d1521496cc [docs] fill out search-table docs 2022-07-13 22:24:49 -07:00
Timothy Stack 4c20b0039c [sql] some more error improvements 2022-07-13 15:43:41 -07:00
Timothy Stack dde6d88430 [exec] fix reporting of errors in scripts 2022-07-12 22:52:40 -07:00
Timothy Stack e669f6ca55 [build] distcheck fix for header 2022-07-12 13:51:37 -07:00
Timothy Stack 3c54f20fce [sysclip] support osc 52 for copying to the clipboard
Fixes #825
2022-07-12 13:16:13 -07:00
Timothy Stack 3b9235b6e6 [tests] don't use syslog files since their timestamps are unreliable 2022-07-12 08:47:19 -07:00
Timothy Stack 6393990b91 [nits] miscellaneous issues 2022-07-11 23:17:42 -07:00
Timothy Stack a3f5c3239e [vtab] some more indexing fixes 2022-07-11 00:09:08 -07:00
Timothy Stack 39763b2d31 [vtab] add indexes for text columns 2022-07-10 21:00:45 -07:00
Timothy Stack 880fe6a68a [tests] handle older sqlite 2022-07-08 15:55:53 -07:00
Timothy Stack f3934c742d [error] leverage sqlite3_error_offset 2022-07-08 14:17:34 -07:00
Timothy Stack 8b3b8a6e3c [perf] fix some text file loading issues 2022-07-07 22:13:18 -07:00
Timothy Stack 01031a9fa3 [build] add missing include 2022-07-07 11:00:19 -07:00
Timothy Stack 7db3c7d3cf [tests] fix index test 2022-07-07 10:46:06 -07:00
Timothy Stack 36e9433891 [perf] try to overlap line buffer i/o 2022-07-07 10:05:06 -07:00
Timothy Stack 09bd5396b2 [build] remove use of <algorithm> in header 2022-07-06 23:04:01 -07:00
Timothy Stack ef7c7fa9b4 [build] remove use of <algorithm> 2022-07-06 22:57:53 -07:00
Timothy Stack a687de1690 [build] missing include 2022-07-06 22:43:22 -07:00
Timothy Stack ea16ee630b [libs] bump ghc::filesystem 2022-07-06 22:30:51 -07:00
Timothy Stack dae3f6b7bc [libs] bump doctest 2022-07-06 22:27:33 -07:00
Timothy Stack c27ee7fdd5 [libs] bump fmt version 2022-07-06 22:19:39 -07:00
Timothy Stack 262c993a31 [libs] bump pugixml version 2022-07-06 21:22:14 -07:00
Timothy Stack a3e1fd27b8 [db] charting of JSON values was mistakenly limited to very short values 2022-07-06 21:10:23 -07:00
Timothy Stack 7fe91d6186 [tests] fix sql_anno test 2022-07-06 11:58:25 -07:00
Timothy Stack d6c9b0036a [spectro] improve error messages and fix some issues with invalidation 2022-07-06 11:56:29 -07:00
Timothy Stack 812fa08055 [search-table] some more enhancements to search-tables 2022-07-05 21:46:12 -07:00
Timothy Stack 13910aff7a [lnav_log] leak the dumper list vector to avoid static ordering issues 2022-07-05 13:12:13 -07:00
Timothy Stack 635dd996a9 [build] fix win build 2022-07-05 12:15:24 -07:00
Timothy Stack 20cb489ce3 [build] fix some include issues 2022-07-05 11:46:15 -07:00
Timothy Stack 52fe2db376 [spectro] add a summary overlay to the selected position and show log messages in a panel 2022-07-05 11:06:37 -07:00
Timothy Stack cec6c3a225 [build] check for limit/offset def 2022-07-01 18:13:56 -07:00
Timothy Stack 2351438e4c [tests] missed some expected output 2022-07-01 16:08:18 -07:00
Timothy Stack 72c1c48e23 [perf] fixing slow queries 2022-07-01 16:02:14 -07:00
Timothy Stack d5b06fca5f [mark-expr] expression marks should count when showing elapsed time 2022-06-29 11:04:37 -07:00
Timothy Stack bd1b90a101 fix -H usage and mem leak 2022-06-29 09:53:23 -07:00
Timothy Stack 09ee65e917 [tests] force locale 2022-06-29 09:35:58 -07:00
Timothy Stack f6fa834aa6 [test_yajlpp] missed freeing the tree 2022-06-29 06:57:19 -07:00
Timothy Stack 5fc9917a4b [tests] missed adding expected output 2022-06-29 06:55:17 -07:00
Timothy Stack ce7f974598 [tests] fix spectro test 2022-06-29 00:07:39 -07:00
Timothy Stack c666a669fe [spectro] fix key colors 2022-06-28 23:15:50 -07:00
Timothy Stack 717c039100 [dist] missed arena headers 2022-06-28 23:15:22 -07:00
Timothy Stack 689793d39f [build] try to fix issue 2022-06-28 22:44:02 -07:00
Timothy Stack 2a9f0bcda8 [docs] add version tag to watch expr section 2022-06-28 22:26:57 -07:00
Timothy Stack f9f797fc9d [logfile_sub_source] add log message watch expressions
Fixes #539
2022-06-28 22:23:56 -07:00
Timothy Stack 906494ebfa [errors] try to improve some errors 2022-06-22 22:53:52 -07:00
Timothy Stack a3b9314ff7 [yajlpp] add for_child() helper 2022-06-22 11:25:11 -07:00
Timothy Stack 464cda8b82 [tests] update expected output 2022-06-22 09:09:01 -07:00
Timothy Stack 041cc2c551 [themes/monocai] add snippet-border definition 2022-06-21 22:26:39 -07:00
Timothy Stack c24be236a3 [:goto] raise an error if the input is not fully parsed
Related to #999
2022-06-21 22:16:57 -07:00
Timothy Stack 9d590836f3 [perf] tweak initial line buffer request size 2022-06-13 22:09:52 -07:00
Timothy Stack c0f4254f1c [attr_line] minor perf fix 2022-06-13 21:30:08 -07:00
Timothy Stack 64e7b78c6b [attr_line] fixes for empty attributes 2022-06-13 21:01:01 -07:00
Timothy Stack 6c6d1cbf41 [snap] fix libcurl package name 2022-06-13 11:46:14 -07:00
Timothy Stack db754068c8 [snap] add libcurl-dev 2022-06-13 11:17:46 -07:00
Timothy Stack 84ec014a8d [coverity] fix some issues found by coverity 2022-06-13 09:31:32 -07:00
Timothy Stack 7eb4d1b6e6 [input] remove capture of ctrl-d
Not sure why this was ever put in in the first place.

Fixes #945
2022-06-12 22:11:01 -07:00
Timothy Stack f3e6048b3c [ci] try to add coverity 2022-06-12 15:25:46 -07:00
Timothy Stack e03d216b8b [overlay] remove log view summary line 2022-06-11 21:17:24 -07:00
Timothy Stack bcc7436f66 [console] syntax highlight some snippets 2022-06-11 08:39:02 -07:00
Timothy Stack 64bee48fb0 [view] preserve top time when filtering 2022-06-11 06:43:55 -07:00
Timothy Stack bc467aacf2 [formats] skip closed file 2022-06-10 22:44:05 -07:00
Timothy Stack 7d2258764c [vtab] skip closed files 2022-06-10 21:41:48 -07:00
Timothy Stack 1891ceb7b5 [perf] fix some performance issues with log vtabs
Fixes #995
2022-06-10 21:17:02 -07:00
Timothy Stack d9ae810dd6 [build] fix type 2022-06-09 13:21:52 -07:00
Timothy Stack 56f6b801d2 [build] fix overridden methods 2022-06-09 13:15:41 -07:00
Timothy Stack 6c52760cc9 [events] initial events work
Related to #811
2022-06-09 12:49:06 -07:00
Timothy Stack 1ea385ea3b [document.sections] fix sections 2022-06-07 15:24:09 -07:00
Timothy Stack 9dbbec832c [formats] more vmw format updates 2022-06-06 21:23:33 -07:00
Timothy Stack d54f21d7a5 [build] fix some warnings 2022-06-04 22:58:19 -07:00
Timothy Stack eeddc318ff [formats] fix some of the vmw formats 2022-06-04 20:35:47 -07:00
Timothy Stack 0b6de5ae31 [oops] remove leftover debug log 2022-06-04 15:46:00 -07:00
Timothy Stack 60251dda84 [w3c_log] handle an invalid log correctly
Fixes #988
2022-06-04 15:31:48 -07:00
Timothy Stack ef8c641e59 [date_time_scanner] fix an overflow
Fixes #989
2022-06-04 11:05:39 -07:00
Timothy Stack 3b54260ea4 [build] add brotlicommon to msys build 2022-06-04 08:42:48 -07:00
Timothy Stack a442418b18 [build] more msys stuff 2022-06-04 08:27:44 -07:00
Timothy Stack 10a7152ca6 [config] fail if libcurl is not available 2022-06-04 08:19:47 -07:00
Timothy Stack b74dfbfb03 [build] add libunistring for msys 2022-06-04 08:18:44 -07:00
Timothy Stack 54806f7913 [build] try to fix curl config for msys 2022-06-04 07:59:07 -07:00
Timothy Stack d7162f6366 [build] add missing msys package 2022-06-04 07:18:27 -07:00
Timothy Stack c9724e1eb2 [build] more msys 2022-06-04 00:20:10 -07:00
Timothy Stack adf8f77e30 [build] more msys 2022-06-04 00:03:52 -07:00
Timothy Stack 023c9568d8 [build] try to fix msys build 2022-06-03 23:09:25 -07:00
Timothy Stack f01564fea4 [perf] fix url download performance 2022-06-03 21:41:21 -07:00
Timothy Stack dfaeee7f44 [perf] fix some performance issues 2022-06-03 19:17:00 -07:00
Timothy Stack 24a56042d0 [file-collection] restore progress after move nulls out pointer 2022-06-03 07:06:07 -07:00
Timothy Stack 1dade3d66e [release] build pcre with unicode props 2022-06-01 11:15:33 -07:00
Timothy Stack 6105db3c32 [build] try try try 2022-05-24 10:15:52 -07:00
Timothy Stack 6b59b03750 [build] try to fix a couple of build issues 2022-05-24 00:15:40 -07:00
Timothy Stack f389005d40 [build] try to fix msys build 2022-05-23 23:31:59 -07:00
Timothy Stack ae0760045e [ci] cat config.log for msys build 2022-05-23 23:21:56 -07:00
Timothy Stack 4dccb7424c [distcheck] missed removing a generated file 2022-05-23 22:55:32 -07:00
Timothy Stack 2e20195b99 [afl] some more fixes for fuzzer bugs
Fixes #987
Fixes #986
Fixes #985
Fixes #984
Fixes #982
2022-05-23 21:41:50 -07:00
Timothy Stack 2bc258e621 [afl] fix bugs detected by a fuzzer
Fixes #981 #983
2022-05-22 22:45:06 -07:00
Timothy Stack 31a670ce27 [md4c] initial markdown support 2022-05-22 20:44:18 -07:00
Timothy Stack 0c7f6145c9 [data_scanner] fix file:/path recognition in data_scanner 2022-05-11 12:20:02 -07:00
Timothy Stack 5e6985d8a4 [release] some updates 2022-05-11 09:06:02 -07:00
Timothy Stack b2e4e59a40 [build] handle older versions of sqlite 2022-05-10 22:28:20 -07:00
Timothy Stack 45262b80c4 [build] fix some itertools issues 2022-05-10 22:22:25 -07:00
Timothy Stack dd93250648 [build] rewrite itertools use 2022-05-10 22:08:07 -07:00
Timothy Stack f03f9e704f [views] add a breadcrumb view 2022-05-10 21:58:32 -07:00
Timothy Stack 2c4b1d3886 [blog] add a screenshot of new error message 2022-05-01 22:54:28 -07:00
Timothy Stack 64d5ae4ad4 [docs] fix post meta 2022-05-01 15:45:37 -07:00
Timothy Stack 7cc55734a8 [docs] add some regex101 integration stuff 2022-05-01 15:42:13 -07:00
Timothy Stack d161f5cdac [tests] disable test for now 2022-04-30 21:50:35 -07:00
Timothy Stack 6e26e90096 [tests] fix path substitution for expected 2022-04-30 21:15:15 -07:00
Timothy Stack ea362a5866 [build] skip regex101 test for now 2022-04-30 19:27:34 -07:00
Timothy Stack 0c54d19fc0 [tests] switch back to echo for test command 2022-04-30 18:38:39 -07:00
Timothy Stack c17f40f7ab [test] comment out test for now 2022-04-30 14:59:20 -07:00
Timothy Stack 6f8cafaf84 [build] regen expected files 2022-04-30 14:55:26 -07:00
Timothy Stack 182da31213 [tests] fix some test issues 2022-04-30 14:42:21 -07:00
Timothy Stack f2968a7032 [build] missing include ... again 2022-04-30 13:17:50 -07:00
Timothy Stack 45b9745cf2 [build] missing include 2022-04-30 13:14:28 -07:00
Timothy Stack a27198e8ca [regex101] add an integration with regex101
... and a pile of other changes
2022-04-30 13:06:01 -07:00
Tim Stack 69b5cb1d58
Merge pull request #968 from pedropombeiro/unifi_iptables_log
unifi: Support iptables log file
2022-04-19 14:56:39 -07:00
Timothy Stack 6251aa066c [build] set locale to fix glob() sorting 2022-04-12 22:20:45 -07:00
Timothy Stack c43367491c [build] add new files to dist 2022-04-12 16:37:53 -07:00
Timothy Stack b69b3e4ec4 [docs] update links from lnav.readthedocs.io to docs.lnav.org 2022-04-12 16:33:09 -07:00
Timothy Stack d378398b33 [docs] fix link to attr_line.hh 2022-04-12 16:17:08 -07:00
Timothy Stack 4439c9f3ce [build] fix callback type 2022-04-12 16:10:11 -07:00
Timothy Stack 0785a432fa [console] colorize console output 2022-04-12 16:07:13 -07:00
Pedro Pombeiro 880ae7fc57
unifi: Support iptables log file 2022-04-11 22:26:15 +02:00
Timothy Stack 7652c58248 [win] catch locale exception 2022-04-06 13:07:08 -07:00
Timothy Stack c125211a7e [lss] use adjusted time
Related to #967
2022-04-06 12:23:07 -07:00
Timothy Stack 1019714409 [rescan] automatically pop the text view when the last text file is promoted 2022-04-04 21:54:20 -07:00
Timothy Stack 292724d7ad [build] remove use of memset 2022-04-04 11:53:47 -07:00
Timothy Stack 5eaf1c4332 [exttm] missed an initialization 2022-04-04 09:58:16 -07:00
Timothy Stack c8799b1c99 [build] missing include 2022-04-04 09:30:03 -07:00
tstack 28957de012 Update tailer 2022-04-04 16:15:44 +00:00
Timothy Stack d82140de52 [date-time-scanner] fix generating with a user-defined format
Fixes #967
2022-04-04 09:14:57 -07:00
Timothy Stack 531c35158c [tidy] some more tidying 2022-04-03 22:10:20 -07:00
Timothy Stack 99c1688c2e [attr_line] use variant instead of a union for attribute values 2022-03-31 23:21:59 -07:00
Timothy Stack ffd364ec12 [view_curses] fix ident length calculation 2022-03-31 09:24:46 -07:00
Timothy Stack 81e63784e7 [modernize] some more cleanups 2022-03-31 08:59:33 -07:00
tstack cfa6f35c44 Update tailer 2022-03-29 05:02:10 +00:00
Timothy Stack b856cd9657 [build] silence some warnings 2022-03-28 22:00:49 -07:00
Timothy Stack 98ca668a03 [build] fix a declaration 2022-03-25 21:32:43 -07:00
Timothy Stack 6fff9d60f5 [build] some clang-tidy fixes 2022-03-25 16:38:11 -07:00
Timothy Stack eb42ef6e77 [build] try cmake build again 2022-03-16 22:29:45 -07:00
Timothy Stack 8b3bb9312e [build] cmake fixes for linux 2022-03-16 21:41:37 -07:00
Timothy Stack 516a20b94a [cmake] add user preset example 2022-03-16 15:42:09 -07:00
Timothy Stack 66ef5fdae1 [clang-format] init 2022-03-16 15:38:08 -07:00
Timothy Stack d0ba84d9be [build] run cmake-init and switch from hunter to conan for packages 2022-03-13 22:44:12 -07:00
Timothy Stack a0ee4427a6 [build] try to fix missing include 2022-03-13 21:46:15 -07:00
Timothy Stack 4564e162d0 [build] try to optimize compile time 2022-03-13 15:49:41 -07:00
Tim Stack f2256c7aab
Merge pull request #965 from pedropombeiro/unifi-improvements
UniFi improvements
2022-03-13 15:48:41 -07:00
Pedro Pombeiro ca3b4b6c8c
unifi: Add kernel-other-proto format 2022-03-07 23:24:15 +01:00
Pedro Pombeiro 5028f84b59
Add ID for 'dnsmasq-dhcp' and 'other' formats 2022-03-07 23:24:15 +01:00
Pedro Pombeiro 16f5886cb1
Improvements to unifi format 2022-03-07 23:24:14 +01:00
Timothy Stack 0e23dcf4b5 [release] bump release number 2022-03-05 11:02:35 -08:00
Timothy Stack 87beb6dd78 [tests] set TZ for pcap test 2022-03-04 21:42:55 -08:00
Tim Stack d43576e41a
Merge pull request #963 from pedropombeiro/unifi_log
Add format for UniFi gateway
2022-03-04 10:47:38 -08:00
Pedro Pombeiro 894c36dac4
Add format for UniFi gateway 2022-03-04 00:35:13 +01:00
Tim Stack 30c603c1c8
Merge pull request #961 from pschiffe/master
Add `#include <iterator>` to `string_util.cc`
2022-02-21 12:55:18 -08:00
Peter Schiffer b8a31ae9b4
Add `#include <iterator>` to `string_util.cc`
Lnav fails to build on the next Fedora version due to the following error:
```
make[3]: Entering directory '/builddir/build/BUILD/lnav-0.10.1/src/base'
g++ -std=c++14 -DHAVE_CONFIG_H -I. -I../../src   -Wall -I../../src/ -I../../src/third-party -I../../src/fmtlib     -I../../src/third-party/doctest-root  -I/usr/local/include -D_ISOC99_SOURCE -D__STDC_LIMIT_MACROS -D_GNU_SOURCE  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c -o string_util.o string_util.cc
make[3]: Leaving directory '/builddir/build/BUILD/lnav-0.10.1/src/base'
string_util.cc: In function 'std::string repeat(const std::string&, size_t)':
string_util.cc:199:22: error: 'ostream_iterator' is not a member of 'std'
  199 |     std::fill_n(std::ostream_iterator<std::string>(os), num, input);
      |                      ^~~~~~~~~~~~~~~~
string_util.cc:38:1: note: 'std::ostream_iterator' is defined in header '<iterator>'; did you forget to '#include <iterator>'?
   37 | #include "string_util.hh"
  +++ |+#include <iterator>
   38 |
```

Reason is probably the updated GNU toolchain, more info:
https://fedoraproject.org/wiki/Changes/GNUToolchainF36

This patch fixes the issue.
2022-02-21 21:09:30 +01:00
Tim Stack 4d62826cae
Merge pull request #960 from thedataflows/master
Proposal to add github actions to build for Windows
2022-02-21 09:42:06 -08:00
Cristian Chiru 146a2ad857 Add github actions to build for Windows 2022-02-20 23:18:45 +02:00
Tim Stack c254c7ebc6
Merge pull request #959 from thedataflows/master
Fixes for building on Windows
2022-02-19 18:35:53 -08:00
Cristian Chiru 084b88b6f4 Fix func signature 2022-02-20 03:32:33 +02:00
Cristian Chiru b23e0ad508 Fix lnav homedir for windows 2022-02-20 03:30:07 +02:00
Cristian Chiru e2fe64e536 Fix for building on msys2; Closes #795 2022-02-20 01:35:40 +02:00
Cristian Chiru 092af9b694 Add missing include, closes #956 2022-02-20 01:10:41 +02:00
Tim Stack b2c7018d2d
Merge pull request #958 from solsticedhiver/patch-1
Mention the name of the remote binary file
2022-02-16 08:27:02 -08:00
solsTiCe d'Hiver 62901ac89d
Mention the name of the remote binary file
To avoid surprise, just mention the name of the remote binary file that is written and deleted immediately.

Sometimes it is not deleted. (when ?)
2022-02-16 10:17:32 +01:00
Tim Stack f02a8e2fe9
Update c-cpp.yml
remove apt update
2022-01-28 18:18:01 -08:00
Timothy Stack 43df8f75a2 [site] add goatcounter 2022-01-12 14:02:39 -08:00
Timothy Stack 8bb034eeeb [pcap] initial pcap support
Fixes #12
2021-11-05 15:13:16 -07:00
Timothy Stack c52240a25d [pages] update version number 2021-10-28 09:22:08 -07:00
1901 changed files with 227598 additions and 133321 deletions

178
.clang-format Normal file
View File

@ -0,0 +1,178 @@
---
Language: Cpp
# BasedOnStyle: Chromium
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: Consecutive
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: DontAlign
AlignOperands: DontAlign
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: TopLevelDefinitions
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: MultiLine
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: true
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Custom
# BreakBeforeInheritanceComma: true
BreakInheritanceList: BeforeComma
BreakBeforeTernaryOperators: true
# BreakConstructorInitializersBeforeComma: true
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: true
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Regroup
IncludeCategories:
# Standard library headers come before anything else
- Regex: '^<[a-z_]+>'
Priority: -1
- Regex: '^<.+\.h(pp)?>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: ''
IncludeIsMainSourceRegex: ''
IndentCaseLabels: true
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: AfterHash
IndentExternBlock: NoIndent
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: Wrapped
JavaScriptQuotes: Double
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 4
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 4
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
RawStringFormats:
- Language: Cpp
Delimiters:
- cc
- CC
- cpp
- Cpp
- CPP
- 'c++'
- 'C++'
CanonicalDelimiter: ''
BasedOnStyle: google
- Language: TextProto
Delimiters:
- pb
- PB
- proto
- PROTO
EnclosingFunctions:
- EqualsProto
- EquivToProto
- PARSE_PARTIAL_TEXT_PROTO
- PARSE_TEST_PROTO
- PARSE_TEXT_PROTO
- ParseTextOrDie
- ParseTextProtoOrDie
- ParseTestProto
- ParsePartialTestProto
CanonicalDelimiter: ''
BasedOnStyle: google
ReflowComments: true
SortIncludes: CaseInsensitive
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatementsExceptForEachMacros
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Auto
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
...

162
.clang-tidy Normal file
View File

@ -0,0 +1,162 @@
---
# Enable ALL the things! Except not really
# misc-non-private-member-variables-in-classes: the options don't do anything
Checks: >
*,
-google-readability-todo,
-altera-unroll-loops,
-altera-id-dependent-backward-branch,
-altera-struct-pack-align,
-fuchsia-*,
fuchsia-multiple-inheritance,
-llvm-header-guard,
-llvm-include-order,
-llvmlibc-*,
-modernize-use-trailing-return-type,
-misc-non-private-member-variables-in-classes,
-cppcoreguidelines-pro-type-vararg,
-hicpp-vararg,
-cppcoreguidelines-avoid-c-arrays,
-hicpp-avoid-c-arrays,
-modernize-avoid-c-arrays
WarningsAsErrors: ''
CheckOptions:
- key: 'bugprone-argument-comment.StrictMode'
value: 'true'
# Prefer using enum classes with 2 values for parameters instead of bools
- key: 'bugprone-argument-comment.CommentBoolLiterals'
value: 'true'
- key: 'bugprone-misplaced-widening-cast.CheckImplicitCasts'
value: 'true'
- key: 'bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression'
value: 'true'
- key: 'bugprone-suspicious-string-compare.WarnOnLogicalNotComparison'
value: 'true'
- key: 'readability-simplify-boolean-expr.ChainedConditionalReturn'
value: 'true'
- key: 'readability-simplify-boolean-expr.ChainedConditionalAssignment'
value: 'true'
- key: 'readability-uniqueptr-delete-release.PreferResetCall'
value: 'true'
- key: 'cppcoreguidelines-init-variables.MathHeader'
value: '<cmath>'
- key: 'cppcoreguidelines-narrowing-conversions.PedanticMode'
value: 'true'
- key: 'readability-else-after-return.WarnOnUnfixable'
value: 'true'
- key: 'readability-else-after-return.WarnOnConditionVariables'
value: 'true'
- key: 'readability-inconsistent-declaration-parameter-name.Strict'
value: 'true'
- key: 'readability-qualified-auto.AddConstToQualified'
value: 'true'
- key: 'readability-redundant-access-specifiers.CheckFirstDeclaration'
value: 'true'
# These seem to be the most common identifier styles
- key: 'readability-identifier-naming.AbstractClassCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ClassCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ClassConstantCase'
value: 'UPPER_CASE'
- key: 'readability-identifier-naming.ClassMemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ClassMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstantCase'
value: 'UPPER_CASE'
- key: 'readability-identifier-naming.ConstantMemberCase'
value: 'UPPER_CASE'
- key: 'readability-identifier-naming.ConstantParameterCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstantPointerParameterCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstexprFunctionCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstexprMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstexprVariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.EnumCase'
value: 'lower_case'
- key: 'readability-identifier-naming.EnumConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.FunctionCase'
value: 'lower_case'
- key: 'readability-identifier-naming.GlobalConstantCase'
value: 'UPPER_CASE'
- key: 'readability-identifier-naming.GlobalConstantPointerCase'
value: 'lower_case'
- key: 'readability-identifier-naming.GlobalFunctionCase'
value: 'lower_case'
- key: 'readability-identifier-naming.GlobalPointerCase'
value: 'lower_case'
- key: 'readability-identifier-naming.GlobalVariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.InlineNamespaceCase'
value: 'lower_case'
- key: 'readability-identifier-naming.LocalConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.LocalConstantPointerCase'
value: 'lower_case'
- key: 'readability-identifier-naming.LocalPointerCase'
value: 'lower_case'
- key: 'readability-identifier-naming.LocalVariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.MacroDefinitionCase'
value: 'UPPER_CASE'
- key: 'readability-identifier-naming.MemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.MethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.NamespaceCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ParameterCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ParameterPackCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PointerParameterCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PrivateMemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PrivateMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ProtectedMemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ProtectedMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PublicMemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PublicMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ScopedEnumConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.StaticConstantCase'
value: 'UPPER_CASE'
- key: 'readability-identifier-naming.StaticVariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.StructCase'
value: 'lower_case'
- key: 'readability-identifier-naming.TemplateParameterCase'
value: 'CamelCase'
- key: 'readability-identifier-naming.TemplateTemplateParameterCase'
value: 'CamelCase'
- key: 'readability-identifier-naming.TypeAliasCase'
value: 'lower_case'
- key: 'readability-identifier-naming.TypedefCase'
value: 'lower_case'
- key: 'readability-identifier-naming.TypeTemplateParameterCase'
value: 'CamelCase'
- key: 'readability-identifier-naming.UnionCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ValueTemplateParameterCase'
value: 'CamelCase'
- key: 'readability-identifier-naming.VariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.VirtualMethodCase'
value: 'lower_case'
- key: 'readability-identifier-length.MinimumVariableNameLength'
value: '2'
- key: 'readability-identifier-length.MinimumParameterNameLength'
value: '2'
...

6
.codespellrc Normal file
View File

@ -0,0 +1,6 @@
[codespell]
builtin = clear,rare,en-GB_to_en-US,names,informal,code
check-filenames =
check-hidden =
skip = */.git,*/build,*/prefix,*/conan
quiet-level = 2

View File

@ -8,7 +8,7 @@ assignees: ''
---
**lnav version**
v0.9.0 is the latest
v0.11.1 is the latest
**Describe the bug**
A clear and concise description of what the bug is.

View File

@ -3,6 +3,7 @@ name: ci-build
on:
push:
branches: [ master ]
tags: ['*']
pull_request:
branches: [ master ]
@ -11,8 +12,8 @@ jobs:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Update apt
run: sudo apt-get update
# - name: Update apt
# run: sudo apt-get update
# - name: Install packages
# run: sudo apt-get install libncursesw5-dev libpcre++-dev libsqlite3-dev libbz2-dev libcurl4-openssl-dev libreadline-dev zlib1g-dev lcov
# - name: install cpp-coveralls
@ -22,7 +23,7 @@ jobs:
- name: configure
run: ./configure --disable-static --enable-code-coverage --enable-debug CFLAGS=-g3 CXXFLAGS=-g3
- name: make
run: make -j2
run: make -j3
- name: make check
run: make check
- name: upload cover
@ -44,6 +45,7 @@ jobs:
--exclude src/ww898
--exclude src/yajl
--exclude test
--exclude src/data_scanner_re.cc
--gcov-options '\-lp'
build:
@ -59,12 +61,14 @@ jobs:
automake
autoconf
g++
libpcre2-dev
libpcre3-dev
libncurses-dev
libsqlite3-dev
libbz2-dev
libcurl4-openssl-dev
libreadline-dev
tshark
zlib1g-dev
- name: autogen
run: ./autogen.sh
@ -81,3 +85,107 @@ jobs:
name: lnav-tot-linux-64bit.zip
# A file, directory or wildcard pattern that describes what to upload
path: src/lnav
build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- { icon: '🟦', sys: MSYS }
name: ${{ matrix.icon }} ${{ matrix.sys }}
defaults:
run:
shell: msys2 {0}
steps:
- name: '🧰 Checkout'
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: '${{ matrix.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
install: >-
autoconf
automake
gcc
git
make
zip
msys/libarchive-devel
msys/libbz2-devel
msys/libcurl-devel
msys/libidn2-devel
msys/liblzma-devel
msys/libreadline-devel
msys/libsqlite-devel
msys/libunistring-devel
msys/ncurses-devel
msys/pcre2-devel
msys/zlib-devel
- name: '🔧 Generate and configure'
run: |
set -x
./autogen.sh
mkdir -p ../lnav-build
cd ../lnav-build
export PREFIX=$PWD/lnav
../lnav/configure \
--enable-static \
LDFLAGS="-static" \
CPPFLAGS="-I../src -I../../lnav/src -I../../lnav/src/fmtlib -O2 -DNCURSES_STATIC" \
CXXFLAGS="-fPIC" \
CFLAGS="-fPIC" \
LIBS="-larchive -lssh2 -llzma -llz4 -lz -lzstd -lssl -lcrypto -liconv -lunistring -lbrotlicommon" \
--sysconfdir=/etc \
--prefix=$PREFIX || cat config.log
- name: '🚧 Make (do not use -j)'
run: |
set -x
cd ../lnav-build
make CFLAGS="-c"
strip -s src/lnav.exe
- name: '📦 Package for distribution'
run: |
set -x
cd ../lnav-build
export PREFIX=$PWD/lnav
make install
ldd $PREFIX/bin/lnav.exe | grep /usr | cut -d' ' -f3 | xargs -I {} cp {} $PREFIX/bin/
mkdir -p lib/terminfo/78
cp -r /usr/lib/terminfo/78/xterm-256color lib/terminfo/78/
zip -r ../lnav/lnav-${{ github.ref_name }}-windows-amd64.zip lnav lib
- name: '💉 Basic test'
run: |
set -x
cd ../lnav-build
export PREFIX=$PWD/lnav
$PREFIX/bin/lnav.exe -n ../lnav/test/logfile_multiline.0
- name: '⬆️ Upload a Build Artifact'
uses: actions/upload-artifact@v2
with:
name: lnav-${{ github.ref_name }}-windows-amd64.zip
path: lnav-${{ github.ref_name }}-windows-amd64.zip
if-no-files-found: error
# - name: '🎁 Create Release'
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref_name }}
# release_name: Release ${{ github.ref_name }}
# draft: false
# prerelease: false
# - name: '⬆️ Upload Release Asset'
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: ./lnav-${{ github.ref_name }}-windows-amd64.zip
# asset_name: lnav-${{ github.ref_name }}-windows-amd64.zip
# asset_content_type: application/zip

48
.github/workflows/coverity.yml vendored Normal file
View File

@ -0,0 +1,48 @@
# GitHub actions workflow.
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
name: Coverity Scan
on:
push:
branches: [ main ]
schedule:
# The GH mirroring from Google GoB does not trigger push actions.
# Fire it once a week to provide some coverage.
- cron: '39 2 * * WED'
# Allow for manual triggers from the web.
workflow_dispatch:
jobs:
coverity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update apt
run: sudo apt-get update
- name: Install packages
run: >-
sudo apt-get install -y
make
automake
autoconf
g++
libpcre3-dev
libncurses-dev
libsqlite3-dev
libbz2-dev
libcurl4-openssl-dev
libreadline-dev
tshark
zlib1g-dev
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure --disable-static
- uses: vapier/coverity-scan-action@v1
with:
command: make -j$(getconf _NPROCESSORS_CONF)
email: ${{ secrets.COVERITY_SCAN_EMAIL }}
token: ${{ secrets.COVERITY_SCAN_TOKEN }}

13
.gitignore vendored
View File

@ -2,7 +2,7 @@
.lnav
*.dat
*.diff
*.err
test/*.err
*.index
*.log
*.o
@ -16,6 +16,7 @@ Makefile
Makefile.in
TESTS_ENVIRONMENT
aclocal.m4
aminclude_static.am
ar-lib
autom4te.cache
compile
@ -30,6 +31,7 @@ missing
mkinstalldirs
test-driver
docs/build
release/release-NEWS.md
release/linux-pkg/
release/osx-build-dir/
release/osx-pkg/
@ -91,3 +93,12 @@ test/test_top_status
test/test_yajlpp
test/truncfile.0
cmake-build/
.vs/
.vscode/
build/
cmake/open-cpp-coverage.cmake
cmake-build-*/
conan/
prefix/
CMakeLists.txt.user
CMakeUserPresets.json

View File

@ -33,17 +33,16 @@ The following goals drive the design and implementation of lnav:
## Overview
The whole of lnav consists of a
[log file parser](https://lnav.readthedocs.io/en/latest/formats.html),
[text UI](https://lnav.readthedocs.io/en/latest/ui.html),
[integrations with SQLite](https://lnav.readthedocs.io/en/latest/sqlext.html),
[command-line interface](https://lnav.readthedocs.io/en/latest/cli.html),
and
[commands for operating on logs](https://lnav.readthedocs.io/en/latest/commands.html).
[log file parser](https://docs.lnav.org/en/latest/formats.html),
[text UI](https://docs.lnav.org/en/latest/ui.html),
[integrations with SQLite](https://docs.lnav.org/en/latest/sqlext.html),
[command-line interface](https://docs.lnav.org/en/latest/cli.html), and
[commands for operating on logs](https://docs.lnav.org/en/latest/commands.html).
Since the majority of lnav's operations center around logs, the core
data-structure is the combined log message index. The message index
is populated when new messages are read from log files. The text UI
displays a subset of messages from the index. The SQLite virtual-tables
allow for programmatic access to the messages and lnav's internal state.
data-structure is the combined log message index. The message index is populated
when new messages are read from log files. The text UI displays a subset of
messages from the index. The SQLite virtual-tables allow for programmatic access
to the messages and lnav's internal state.
[![lnav architecture](docs/lnav-architecture.png)](https://whimsical.com/lnav-architecture-UM594Qo4G3nt2XWaSZA1mh)
@ -82,11 +81,11 @@ to generate parsers for several [common formats](src/time_formats.am).
## Log Formats
[log_format](src/log_format.hh) instances are used to parse lines from files
into `logline` objects. The majority of log formats are
into `logline` objects. The majority of log formats are
[external_log_format](src/log_format_ext.hh) objects that are create from
[JSON format definitions](https://lnav.readthedocs.io/en/latest/formats.html).
The built-in definitions are located in the [formats](src/formats) directory.
Log formats that cannot be handled through a simple regular expression are
[JSON format definitions](https://docs.lnav.org/en/latest/formats.html). The
built-in definitions are located in the [formats](src/formats) directory. Log
formats that cannot be handled through a simple regular expression are
implemented in the [log_format_impls.cc](src/log_format_impls.cc) file.
## User Interface
@ -98,8 +97,8 @@ used. Instead, the following custom components are built on top of the ncurses
primitives:
- [view_curses](src/view_curses.hh) - Provides the basics for text roles, which
allows for themes to color and style text. The `mvwattrline()` function does
all the heavy lifting of drawing ["attributed" lines](src/attr_line.hh),
allows for themes to color and style text. The `mvwattrline()` function does
all the heavy lifting of drawing ["attributed" lines](src/base/attr_line.hh),
which are strings that have attributes associated with a given range of
characters.
- [listview_curses](src/listview_curses.hh) - Displays a list of items that are

View File

@ -40,3 +40,7 @@ Matt Hayden
Simos Xenitellis
Finnegan Stack
Amos Bird
Cristian Chiru
Peter Schiffer
Pedro Pombeiro
Fredrik Forséll

View File

@ -1,59 +1,59 @@
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.14)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
include("cmake/HunterGate.cmake")
huntergate(URL "https://github.com/cpp-pm/hunter/archive/v0.23.314.tar.gz" SHA1
"95c47c92f68edb091b5d6d18924baabe02a6962a" LOCAL)
include(cmake/prelude.cmake)
set(CMAKE_CXX_STANDARD 14)
project(lnav VERSION 0.10.1)
project(
lnav
VERSION 0.11.1
DESCRIPTION "An advanced log file viewer for the small-scale."
HOMEPAGE_URL "https://lnav.org/"
LANGUAGES CXX C
)
# include(cmake/CodeCoverage.cmake) append_coverage_compiler_flags()
include(cmake/project-is-top-level.cmake)
include(cmake/variables.cmake)
include(CTest)
include(GNUInstallDirs)
hunter_add_package(libpcre)
find_package(libpcre CONFIG REQUIRED)
hunter_add_package(BZip2)
find_package(BZip2 CONFIG REQUIRED)
hunter_add_package(sqlite3)
find_package(sqlite3 CONFIG REQUIRED)
hunter_add_package(ZLIB)
find_package(SQLite3 REQUIRED)
find_package(BZip2 REQUIRED)
find_package(LibArchive REQUIRED)
find_package(ZLIB REQUIRED)
hunter_add_package(CURL)
find_package(CURL CONFIG REQUIRED)
hunter_add_package(ncursesw)
find_package(ncursesw CONFIG REQUIRED)
hunter_add_package(readline)
find_package(pcre REQUIRED)
find_package(pcre2 REQUIRED)
find_package(readline REQUIRED)
hunter_add_package(libarchive)
find_package(libarchive CONFIG REQUIRED)
find_package(ncurses REQUIRED)
find_package(CURL REQUIRED)
set(lnav_LIBS
ZLIB::zlib
BZip2::bz2
sqlite3::sqlite3
PkgConfig::libpcre
CURL::libcurl
readline::readline
readline::history
PkgConfig::ncursesw
PkgConfig::libarchive)
CURL::libcurl
SQLite::SQLite3
BZip2::BZip2
ncurses::libcurses
pcre::libpcre
pcre2::pcre2
readline::readline
LibArchive::LibArchive
ZLIB::ZLIB
)
add_subdirectory(src)
add_subdirectory(test)
# add_subdirectory(test)
# ---- Install rules ----
if (NOT CMAKE_SKIP_INSTALL_RULES)
include(cmake/install-rules.cmake)
endif ()
# ---- Developer mode ----
if (NOT lnav_DEVELOPER_MODE)
return()
elseif (NOT PROJECT_IS_TOP_LEVEL)
message(
AUTHOR_WARNING
"Developer mode is intended for developers of lnav"
)
endif ()
include(cmake/dev-mode.cmake)

142
CMakePresets.json Normal file
View File

@ -0,0 +1,142 @@
{
"version": 2,
"cmakeMinimumRequired": {
"major": 3,
"minor": 14,
"patch": 0
},
"configurePresets": [
{
"name": "cmake-pedantic",
"hidden": true,
"warnings": {
"dev": true,
"deprecated": true,
"uninitialized": true,
"unusedCli": true,
"systemVars": false
},
"errors": {
"dev": true,
"deprecated": true
}
},
{
"name": "dev-mode",
"hidden": true,
"inherits": "cmake-pedantic",
"cacheVariables": {
"lnav_DEVELOPER_MODE": "ON"
}
},
{
"name": "conan",
"hidden": true,
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/conan/conan_toolchain.cmake"
}
},
{
"name": "cppcheck",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_CPPCHECK": "cppcheck;--inline-suppr"
}
},
{
"name": "clang-tidy",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_CLANG_TIDY": "clang-tidy;--header-filter=${sourceDir}/*"
}
},
{
"name": "ci-std",
"description": "This preset makes sure the project actually builds with at least the specified standard",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_EXTENSIONS": "OFF",
"CMAKE_CXX_STANDARD": "14",
"CMAKE_CXX_STANDARD_REQUIRED": "ON"
}
},
{
"name": "flags-unix",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_FLAGS": ""
}
},
{
"name": "flags-windows",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_FLAGS": "/W4 /permissive- /utf-8 /volatile:iso /EHsc /Zc:__cplusplus /Zc:throwingNew"
}
},
{
"name": "ci-unix",
"generator": "Unix Makefiles",
"hidden": true,
"inherits": ["flags-unix", "ci-std"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "ci-win64",
"inherits": ["flags-windows", "ci-std"],
"generator": "Visual Studio 17 2022",
"architecture": "x64",
"hidden": true
},
{
"name": "coverage-unix",
"binaryDir": "${sourceDir}/build/coverage",
"inherits": "ci-unix",
"hidden": true,
"cacheVariables": {
"ENABLE_COVERAGE": "ON",
"CMAKE_BUILD_TYPE": "Coverage",
"CMAKE_CXX_FLAGS_COVERAGE": "-Og -g --coverage -fkeep-inline-functions -fkeep-static-functions",
"CMAKE_EXE_LINKER_FLAGS_COVERAGE": "--coverage",
"CMAKE_SHARED_LINKER_FLAGS_COVERAGE": "--coverage",
"CMAKE_MAP_IMPORTED_CONFIG_SANITIZE": "Coverage;RelWithDebInfo;Release;Debug;"
}
},
{
"name": "ci-coverage",
"inherits": ["coverage-unix", "dev-mode", "conan"],
"cacheVariables": {
"COVERAGE_HTML_COMMAND": ""
}
},
{
"name": "ci-sanitize",
"binaryDir": "${sourceDir}/build/sanitize",
"inherits": ["ci-unix", "dev-mode", "conan"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Sanitize",
"CMAKE_CXX_FLAGS_SANITIZE": "-O2 -g -fsanitize=address,undefined -fno-omit-frame-pointer -fno-common",
"CMAKE_MAP_IMPORTED_CONFIG_SANITIZE": "Sanitize;RelWithDebInfo;Release;Debug;"
}
},
{
"name": "ci-build",
"binaryDir": "${sourceDir}/build",
"hidden": true
},
{
"name": "ci-macos",
"inherits": ["ci-build", "ci-unix", "dev-mode", "conan"]
},
{
"name": "ci-ubuntu",
"inherits": ["ci-build", "ci-unix", "clang-tidy", "conan", "dev-mode"]
},
{
"name": "ci-windows",
"inherits": ["ci-build", "ci-win64", "dev-mode", "conan"]
}
]
}

View File

@ -0,0 +1,62 @@
{
"version": 2,
"cmakeMinimumRequired": {
"major": 3,
"minor": 14,
"patch": 0
},
"configurePresets": [
{
"name": "dev-common",
"hidden": true,
"inherits": ["conan"],
"cacheVariables": {
"BUILD_MCSS_DOCS": "ON"
}
},
{
"name": "dev-unix",
"binaryDir": "${sourceDir}/build/dev-unix",
"inherits": ["dev-common", "ci-unix", "dev-mode"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "dev-win64",
"binaryDir": "${sourceDir}/build/dev-win64",
"inherits": ["dev-common", "ci-win64"]
},
{
"name": "dev",
"binaryDir": "${sourceDir}/build/dev",
"inherits": "dev-unix"
},
{
"name": "dev-coverage",
"binaryDir": "${sourceDir}/build/coverage",
"inherits": ["dev-mode", "coverage-unix", "conan"]
}
],
"buildPresets": [
{
"name": "dev",
"configurePreset": "dev",
"configuration": "Debug",
"jobs": 4
}
],
"testPresets": [
{
"name": "dev",
"configurePreset": "dev",
"configuration": "Debug",
"output": {
"outputOnFailure": true
},
"execution": {
"jobs": 4
}
}
]
}

View File

@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I .
SUBDIRS = src test
SUBDIRS = tools src test
noinst_SCRIPTS = TESTS_ENVIRONMENT

764
NEWS
View File

@ -1,764 +0,0 @@
lnav v0.10.1:
Features:
* Added ":show-only-this-file" command that hides all files except the
one for the top line in the view.
* The ":write-raw-to" command now accepts a --view flag that specifies
the source view for the data to write. For example, to write the
results of a SQL query, you would pass "--view=db" to the command.
* The commands used to access the clipboard are now configured through
the "tuning" section of the configuration.
* Added an "lnav_version()" SQL function that returns the current
version string.
* Added basic support for the logfmt file format. Currently, only files
whose lines are entirely logfmt-encoded are supported. The lines
must also contain either a field named "time" or "ts" that contains
the timestamp.
* Added the "logfmt2json()" SQL function to convert a string containing
a logfmt-encoded message into a JSON object that can be operated on
more easily.
* Added the "gzip()" and "gunzip()" SQL functions to compress values
into a blob and decompress a blob into a string.
Interface changes:
* The xclip implementation for accessing the system clipboard now writes
to the "clipboard" selection instead of the "primary" selection.
* The 'query' bookmark type and y/Y hotkeys have been removed due to
performance issues and the functionality is probably rarely used.
Bug Fixes:
* The text "send-input" would show up on some terminals instead of
ignoring the escape sequence. This control sequence was only
intended to be used in the test suite.
* Remote file synchronization has been optimized a bit.
* Configuration values loaded from the ~/.lnav/configs directory
are now included in the default configuration, so they won't be
saved into the ~/.lnav/config.json user configuration file.
* Key handling in the visual filter editor will no longer swallow
certain key-presses when editing a filter.
* Scrolling performance restored in the SQL view.
* The ':redirect-to' command now works with '/dev/clipboard'
* The field overlay (opened by pressing 'p') now shows 'log_time'
for the timestamp field instead of the name defined in the format.
* The search term in the bottom status bar will now update properly
when switching views.
* The "Out-Of-Time-Order Message" overlay will be shown again.
* The tab for the "Files" panel will be highlighted in red if there
is an issue opening a file.
* Overwritten files should be reloaded again.
* The "jget()" SQL function now returns numbers with the correct type.
* The "json_contains()" SQL function now returns false if the first
argument is NULL instead of NULL.
* The local copies of remote files are now cleaned up after a couple
days of the host not being accessed.
* The initial loading and indexing phase has been optimized.
lnav v0.10.0:
Features:
* Files on remote machines can be viewed/tailed if they are accessible
via SSH. The syntax for specifying the host and path is similar to
scp. For example, to view the files in the /var/log directory on the
machine "host1.example.org":
user@host1.example.org:/var/log
Note that you must be able to log into the machine without any
interaction.
* Added the ':filter-expr' command to filter log messages based on an SQL
expression. This command allows much greater control over filtering.
* Added the ':mark-expr' command to mark log messages based on an SQL
expression. This command makes it easier to programmatically mark
log messages compared to using SQL.
* Added support for archive files, like zip, and other compression formats,
like xz, when compiled with libarchive. When one of these types of
files is detected, they are unpacked into a temporary directory and
all of the files are loaded into lnav.
* Added an 'xpath()' table-valued function for extracting values from
strings containing XML snippets.
* Added the ':prompt' command to allow for more customization of prompts.
Combined with a custom keymapping, you can now open a prompt and prefill
it with a given value. For example, a key could be bound to the
following command to open the command prompt with ":filter-in " already
filled in:
:prompt command : 'filter-in '
* Added support for the W3C Extended Log File Format with the name
"w3c_log". Similarly to the bro log format, the header is used to
determine the columns in a particular file. However, since the columns
can be different between files, the SQL table only has a well-known set
of columns and the remainder are accessible through JSON-objects stored
in columns like "cs_headers" and "sc_headers".
* Added support for the S3 Access File Format.
* To jump to the first search hit above the top line in a view, you can
press CTRL+J instead of ENTER in the search prompt. Pressing ENTER
will jump to the first hit below the current window.
* Filtering, as a whole, can be now disabled/enabled without affecting
the state of individual filters. This includes text and time-filters
(i.e. :hide-lines-before). You can enable/disable filtering by:
pressing 'f' in the filter editor UI; executing the ':toggle-filtering'
command; or by doing an UPDATE on the "filtering" column of the
"lnav_views" SQLite table.
* Themes can now include definitions for text highlights under:
/ui/theme-defs/<theme_name>/highlights
* Added a "grayscale" theme that isn't so colorful.
* Added the humanize_file_size() SQL function that converts a numeric size
to a human-friendly string.
* Added the sparkline() SQL function that returns a "sparkline" bar made
out of unicode characters. It can be used with a single value or as
an aggregator.
* Added a "log_time_msecs" hidden column to the log tables that returns
the timestamp as the number of milliseconds from the epoch.
* Added an "lnav_top_file()" SQL function that can be used to get the
name of the top line in the top view or NULL if the line did not come
from a file.
* Added a "mimetype" column to the lnav_file table that returns a guess as
to the MIME type of the file contents.
* Added a "content" hidden column to the lnav_file table that can be used
to read the contents of the file. The contents can then be passed to
functions that operate on XML/JSON data, like xpath() or json_tree().
* Added an "lnav_top_view" SQL VIEW that returns the row for the top view
in the lnav_views table.
* The "generate_series()" SQLite extension is now included by default.
One change from the standard implementation is that both the start and
stop are required parameters.
* Added the ";.read" SQL command for executing a plain SQL file.
* Added the "-N" flag so that lnav will run without opening the default
syslog file.
Interface Changes:
* When copying log lines, the file name and time offset will be included
in the copy if they are enabled.
* Log messages that cannot be parsed properly will be given an "invalid"
log level and the invalid portions colored yellow.
* The range_start and range_stop values of the regexp_capture() results
now start at 1 instead of zero to match with what the other SQL string
functions expect.
* The ":write-cols-to" command has been renamed to ":write-table-to".
* The DB view will limit the maximum column width to 120 characters.
* The ":echo" command now evaluates its message to do variable
substitution.
* The ":write-raw-to" command has been changed to write the original
log file content of marked lines. For example, when viewing a JSON
log, the JSON-Line values from the log file will be written to the
output file. The ":write-view-to" command has been added to perform
the previous work of ":write-raw-to" where the raw content of the view
is written to the file.
Fixes:
* Unicode text can now be entered in prompts.
* The replicate() SQL function would cause a crash if the number of
replications was zero.
* Many internal improvements.
lnav v0.9.0:
Features:
* Added support for themes and included a few as well: default, eldar,
monocai, night-owl, solarized-light, and solarized-dark. The theme
can be changed using the ':config' command, like so:
:config /ui/theme night-owl
Consult the online documentation for defining a new theme at:
https://lnav.readthedocs.io/en/latest/config.html#theme-definitions
* Added support for custom keymaps and included the following: de, fr,
uk, us. The keymap can be changed using the ':config' command, like so:
:config /ui/keymap uk
Consult the online documentation for defining a new keymap at:
https://lnav.readthedocs.io/en/latest/config.html#keymap-definitions
* The following JSON-Schemas have been published for the log format and
configuration JSON files:
https://lnav.org/schemas/format-v1.schema.json
https://lnav.org/schemas/config-v1.schema.json
Formats should be updated to reference the schema using the "$schema"
property.
* Indexing of new data in log files can now be paused by pressing '='
and unpaused by pressing it again. The bottom status bar will display
'Paused' in the right corner while paused.
* CMake is now a supported way to build.
* When viewing data from the standard-input, a symbolic name can be used
to preserve session state. The name can be changed using the
"rename-stdin" lnav script or by doing an UPDATE to the filepath
column of the lnav_file table. For example, to assign the name
"journald", the following SQL statement can be executed in lnav:
;UPDATE lnav_file SET filepath='journald' WHERE filepath='stdin'
* The size of the terminal can be accessed in SQL using the $LINES and
$COLS variables.
* The raise_error(msg) SQL function has been added to make it easier to
raise an error in an lnav script to stop execution and notify the user.
* Added the json_concat() function to make it easier to append/concatenate
values onto arrays.
* Added the ":write-jsonlines-to" command that writes the result of a SQL
query to a file in the JSON Lines format.
Interface Changes:
* Data piped into lnav is no longer dumped to the console after exit.
Instead a file containing the data is left in .lnav/stdin-captures/
and a message is printed to the console indicating the file name.
* In time-offset mode, the deltas for messages before the first mark
are now negative instead of relative to the start of the log.
* The $XDG_CONFIG_HOME environment variable (or ~/.config directory) are
now respected for storing lnav's configuration. If you have an existing
~/.lnav directory, that will continue to be used until you move it to
$XDG_CONFIG_HOME/lnav or ~/.config/lnav.
* Removed the ':save-config' command. Changes to the configuration are now
immediately saved.
Fixes:
* Added 'notice' log level.
* If a "timestamp-format" is used in an element of a "line-format", the
field name is ignored and a formatted timestamp is always used.
* Ignore stdin when it is connected to /dev/null.
lnav v0.8.5:
Features:
* Added a visual filter editor to make it easier to update existing
filters. The editor can be opened by pressing TAB. Once the editor
is opened, you can create/delete, enable/disable, and edit the patterns
with hotkeys.
* Added an 'lnav_view_filters' SQL table that can be used to
programmatically manipulate filters.
* Added an 'lnav_view_filter_stats' SQL table that contains the number of
times a given filter matched a line in the view.
* Added a 'log_filters' column to log tables that can be used to see what
filters matched the log message.
* A history of locations in a view is now kept so that you can jump back
to where you were previously using the '{' and '}' keys. The location
history can also be accessed through the ":prev-location" and
":next-location" commands.
* The ":write-*" commands will now accept "/dev/clipboard" as a file name
that writes to the system clipboard.
* The ":write-to" and ":write-raw-to" commands will now print out comments
and tags attached to the lines.
* Added a ":redirect-to <path>" command to redirect command output to the
given file. This command is mostly useful in scripts where one might
want to redirect all output from commands like ":echo" and ":write-to -"
to a single file.
* If a log file format has multiple patterns for matching log messages,
each pattern is now tried to match a message in a file. Previously,
only one pattern was ever used for an entire file.
* Added haproxy log format from Peter Hoffmann.
* Added 'spooky_hash()' and 'group_spooky_hash()' SQL functions to
generate a hash of their parameters.
* Added 'time_offset' to the 'lnav_file' table so that the timestamps in
a file can be adjusted programmatically.
Interface Changes:
* The auto-complete behavior in the prompt has been modified to fall back
to a fuzzy search if the prefix search finds no matches. For example,
typing in ":fin" and pressing TAB would previously not do anything.
Now, the ":fin" will be completed to ":filter-in " since that is a
strong fuzzy match. If there are multiple matches, as would happen
with ":dfil", readline's menu-complete behavior will be engaged and
you can press TAB cycle through the options.
* Added CTRL+F to toggle the enabled/disabled state of all filters for the
current view.
* The '-r' flag is now for recursively loading files. The functionality
for loading rotated files is now under the '-R' flag.
* The current search term is now shown in the bottom status bar.
* Some initial help text is now shown for the search and SQL prompts to
refresh the memory.
* When entering the ":comment" command for a line with a comment, the
command prompt will be filled in with the existing comment to make
editing easier.
* Hidden fields now show up as a unicode vertical ellipsis (⋮) instead of
three-dot ellipsis to save space.
* Pressing 7/8 will now move to the previous/next minute.
* The ":write-raw-to" command has been changed to write the entire
contents of the current view and a ":write-screen-to" command has been
added to write only the current screen contents.
* Disabled filters are now saved in sessions.
* The ":adjust-log-time" command now accepts relative times as input.
Fixes:
* The ":write-json-to" command will now pass through JSON cells as their
JSON values instead of a JSON-encoded string.
lnav v0.8.4:
Features:
* Added the ':comment' command that can be used to attach a comment to a
log line. The comment will be displayed below the line, like so:
2017-01-01T15:30:00 error: computer is on fire
+ This is where it all went wrong
The ':clear-comment' command will remove the attached comment. Comments
are searchable with the standard search mechanism and they are available
in SQL through the "log_comment" column.
* Added the ':tag', ':untag', and ':delete-tags' commands that can be used
to attach/detach tags on the top log line and delete all instances of
a tag. Tags are also searchable and are available in SQL as a JSON
array in the "log_tags" column.
* Pressing left-arrow while viewing log messages will reveal the source
file name for each line and the unique parts of the source path.
Pressing again will reveal the full path.
* The file name section of the top status line will show only the unique
parts of the log file path if there is not enough room to show the full
path.
* Added the ":hide-unmarked-lines" and ":show-unmarked-lines" commands
that hide/show lines based on whether they are bookmarked.
* Added the "json_contains()" SQL function to check if a JSON value
contains a number of a string.
* The relative time parser recognizes "next" at the beginning of the
input, for example, "next hour" or "next day". Handy for use in the
":goto" command.
* Added a "text-transform" option for formatting JSON log messages. The
supported options are: none, uppercase, lowercase, and capitalize.
* Added a special "__level__" field name for formatting JSON messages so
that the lnav level name can be used instead of the internal value in
the JSON object.
* Added a log format for journald JSON logs.
Interface Changes:
* When typing in a search, instead of moving the view to the first match
that was found, the first ten matches will be displayed in the preview
window.
* The pretty-print view maintains highlighting from the log view.
* The pretty-print view no longer tries to reverse lookup IP addresses.
* The online help for commands and SQL functions now includes a 'See Also'
section that lists related commands/functions.
Fixes:
* The HOME key should now work in the command-prompt and move the cursor
to the beginning of the line.
* The :delete-filter command should now tab-complete existing filters.
* Milliseconds can now be used in relative times (e.g. 10:00:00.123)
* The J/K hotkeys were not marking lines correctly when the bottom of
the view was reached.
* The level field in JSON logs should now be recognized by the level
patterns in the format.
lnav v0.8.3:
Features:
* Support for the Bro Network Security Monitor (https://www.bro.org) log
file format.
* Added an fstat() table-valued function for querying the local
filesystem.
* Added readlink() and realpath() SQL functions.
* Highlights specified in log formats can now specify the colors to use
for the highlighted parts of the log message.
* Added a ":quit" command.
* Added a "/ui/default-colors" configuration option to specify that the
terminal's default background and foreground colors should be used
instead of black and white.
Interface Changes:
* Pressing delete at a command-prompt will exit the prompt if there is no
other input.
Fixes:
* The help view now includes all the command-help that would pop up as
you entered commands and SQL queries.
* Hidden fields and lines hidden before/after times are now saved in the
current session and restored.
* Unicode characters should now be displayed correctly (make sure you
have LANG set to a UTF-8 locale).
lnav v0.8.2:
Features:
* The timestamp format for JSON log files can be specified with the
"timestamp-format" option in the "line-format" array.
* Added "min-width", "max-width", "align", and "overflow" options to the
"line-format" in format definitions for JSON log files. These options
give you more control over how the displayed line looks.
* Added a "hidden" option to log format values so that you can hide JSON
log fields from being displayed if they are not in the line format.
* Added a "rewriter" field to log format value definitions that is a
command used to rewrite the field in the pretty-printed version of a
log message. For example, the HTTP access log format will rewrite the
status code field to include the textual version (e.g. 200 (OK)).
* Log message fields can now be hidden using the :hide-fields" command or
by setting the 'hidden' property in the log format. When hidden, the
fields will be replaced with a yellow ellipsis when displayed. Hiding
large fields that contain extra details can make the log easier to read.
The 'x' hotkey can be used to quickly toggle whether these fields are
displayed or not.
* Added a ':mark' command to bookmark the top line in the current view.
* Added an ':alt-msg' command that can be used to set the text to be
displayed in the bottom right of the command line. This command is
mostly intended for use by hotkey maps to set the help text.
* In lnav scripts, the first row of a SQL query result will now be turned
into local variables that can be referenced in other commands or
queries. For example, the following script will print the number one:
;SELECT 1 as foobar
:eval :echo ${foobar}
* Added an 'lnav_view_stack' SQL table that gives access to the view
stack.
* Added a 'top_time' column to the lnav_views table so that you can get
the timestamp for the top line in views that are time-based as well as
allowing you to move the view to a given time with an UPDATE statement.
* Added a 'search' column to the lnav_views table so that you can perform
a text search programmatically.
* Added a 'regexp_capture(<string>, <pattern>)' table-valued function for
getting detailed results from matching a regular expression against a
string.
* Added a 'timediff(<time1>, <time2>)' SQL function for computing the
difference between two relative or absolute timestamps.
* Log formats can now define a default set of highlights with the
"highlights" property.
* Added a '|search-for <pattern>' built-in script that can be used to
start a search from the command-line.
* Log format definitions can now specify the expected log level for a
sample line. This check should make it easier to validate the
definition.
Interface Changes:
* Command and SQL documentation is now displayed in a section at the
bottom of the screen when a command or query is being entered. Some
commands will also display a preview of the command results. For
example, the ':open' command will display the first ten lines of the
file to be opened and the ':filter-out' command will highlight text
that matches in the current view. The preview pane can be shown/hidden
by pressing CTRL-P.
* The color used for text colored via ":highlight" is now based on the
the regex instead of randomly picked so that colors are consistent
across invocations.
* The "graph" view has been removed since it's functionality has been
obsoleted by other features, like ":create-search-table".
* When doing a search, if a hit is found within a second after hitting
<ENTER>, the view will move to the matched line. The previous behavior
was to stay on the current line, which tended to be a surprise to new
users.
* Pressing 'n'/'N' to move through the next/previous search hit will now
skip adjacent lines, up to the vertical size of the view. This should
make scanning through clusters of hits much faster. Repeatedly
pressing these keys within a short time will also accelerate scanning
by moving the view at least a full page at a time.
Breaking Changes:
* The captured timestamp text in log files must fully match a known format
or an error will be reported. The previous behavior was to ignore any
text at the end of the line.
Fixes:
* You can now execute commands from the standard input by using a dash (-)
with the '-f' command-line argument. Reading commands from a file
descriptor should also work, for example, with the following bash
syntax:
$ lnav -f <(echo :open the-file-to-open)
* Programming language syntax highlighting should now only be applied to
source code files instead of everywhere.
lnav v0.8.1:
Features:
* Added a spectrogram command and view that displays the values of a
numeric field over time. The view works for log message fields or
for database result columns.
* Log formats can now create SQL views and execute other statements
by adding '.sql' files to their format directories. The SQL scripts
will be executed on startup.
* Added 'json_group_object' and 'json_group_array' aggregate SQL
functions that collects values from a GROUP BY query into a JSON
object or array, respectively.
* The SQL view will now graph values found in JSON objects/arrays in
addition to the regular columns in the result.
* Added an 'regexp_match(<re>, <str>)' SQL function that can be used to
extract values from a string using a regular expression.
* Added an 'extract(<str>)' SQL function that extracts values using the
same data discover/extraction parser used in the 'logline' table.
* Added a "summary" overlay line to the bottom of the log view that
displays how long ago the last message was received, along with the
total number of files and the error rate over the past five minutes.
* Pressing 'V' in the DB view will now check for a column with a
timestamp and move to the corresponding time in the log view.
* Added 'a/A' hotkeys to restore a view previously popped with 'q/Q'.
* Added ":hide-lines-before", ":hide-lines-after", and
":show-lines-before-and-after" commands so that you can filter out
log lines based on time.
* Scripts containing lnav commands/queries can now be executed using
the pipe ('|') hotkey. See the documentation for more information.
* Added an ":eval" command that can be used to execute a command or
query after performing environment variable substitution.
* Added an ":echo" command that can be useful for scripts to message
the user.
* The "log_part" column can now be set with an SQL UPDATE statement.
* Added a "log_body" hidden column that returns the body of the log
message.
* Added ":config", ":reset-config", and ":save-config" commands to change
configuration options, reset to default, and save them for future
executions.
* Added a "/ui/clock-format" configuration option that controls the time
format in the top-left corner.
* Added a "/ui/dim-text" configuration option that controls the brightness
of text in the UI.
* Added support for TAI64 timestamps (http://cr.yp.to/libtai/tai64.html).
* Added a safe execution mode. If the 'LNAVSECURE' environment variable is
set before executing lnav, the following commands are disabled:
- open
- pipe-to
- pipe-line-to
- write-*-to
This makes it easier to run lnav with escalated privileges in restricted
environments, without the risk of users being able to use the above
mentioned commands to gain privileged access.
Interface Changes:
* The 'o/O' hotkeys have been reassigned to navigate through log
messages that have a matching "opid" field. The old action of
moving forward and backward by 60 minutes can be simulated by
using the ':goto' command with a relative time and the 'r/R'
hotkeys.
* Log messages with timestamps that pre-date previous log messages will
have the timestamp highlighted in yellow and underlined. These out-
of-time-order messages will be assigned the time of the previous
message for sorting purposes. You can press the 'p' hotkey to examine
the 'Received Time' of the message as well as the time parsed from the
original message. A "log_actual_time" hidden field has also been
added to the SQLite virtual table so you can operate on the original
message time from the file.
* The 'A/B' hotkeys for moving forward/backward by 10% line increments
have been reassigned to '[' and ']'. The 'a' and 'A' hotkeys are now
used to return to the previously popped view while trying to preserve
the time range. For example, after leaving the spectrogram view with
'q', you can press 'A' return to the view with the top time in the
spectrogram matching the top time in the log view.
* The 'Q' hotkey now pops the current view off of the stack while
maintaining the top time between views.
Fixes:
* Issues with tailing JSON logs have been fixed.
* The jget() SQL function should now work for objects nested in arrays.
lnav v0.8.0:
Features:
* Integration with "papertrailapp.com" for querying and tailing
server log and syslog messages. See the Papertrail section in
the online help for more details.
* Remote files can be opened when lnav is built with libcurl v7.23.0+
* SQL queries can now be done on lines that match a regular expression
using the "log_search" table or by creating custom tables with the
":create-search-table" command.
* Log formats that are "containers" for other log formats, like
syslog, are now supported. See the online help for more
information.
* Formats can be installed from git repositories using the '-i' option.
A standard set of extra formats can be installed by doing
'lnav -i extra'. (You must have git installed for this to work.)
* Added support for 'VMware vSphere Auto Deploy' log format.
* Added a 'sudo' log format.
* Added hotkeys to move left/right by a smaller increment (H/L or
Shift+Left/Shift+Right).
* A color-coded bar has been added to the left side to show where
messages from one file stop and messages from another file start.
* The '-C' option will now try to check any specified log files to
make sure the format(s) match all of the lines.
* Added an "all_logs" SQLite table that contains the message format
extracted from each log line. Also added a ';.msgformat' SQL command
that executes a query that returns the counts for each format and the
first line where the format was seen.
* Added an "lnav_views" SQLite table that can be used to query and
change the lnav view state.
* When typing in a command, the status bar will display a short
summary of the currently entered command.
* Added a "delete-filter" command.
* Added a "log_msg_instance" column to the logline and log_search
tables to make it easier to join tables that are matching log
messages that are ordered.
* Added a "timeslice()" function to SQLite so that it is easier to
group log messages by time buckets.
* The 'goto' command now supports relative time values like
'a minute ago', 'an hour later', and many more.
Interface Changes:
* The 'r/R' hotkeys have been reassigned to navigate through the log
messages by the relative time value that was last used with the
'goto' command.
Fixes:
* The pretty-print view should now work for text files.
* Nested fields in JSON logs are now supported for levels, bodies, etc...
* Tab-completion should work for quoted SQL identifiers.
* 'lo-fi' mode key shortcut changed to CTRL+L.
* 'redraw' shortcut removed. Relegated to just a command.
* Fixed lnav hang in pretty-print mode while doing a dns lookup.
* The generic log message parser used to extract data has been
optimized and should be a bit faster.
lnav v0.7.3:
Features:
* Add 'pipe-to' and 'pipe-line-to' commands that pipe the currently
marked lines or the current log message to a shell command,
respectively.
* Added a "pretty-print" view (P hotkey) that tries to reformat log
messages so that they are easier to read.
* Added a 'redraw' command (CTRL+L hotkey) to redraw the window in
case it has been corrupted.
* Added a 'relative-goto' command to move the current view relative
to its current position.
* Experimental support for linking with jemalloc.
* The plain text view now supports filtering.
* Added 'next-mark' and 'prev-mark' commands to jump to the next or
previous bookmarked line (e.g. error, warning, ...)
* Added a 'zoom-to' command to change the zoom level of the histogram
view.
* Log formats can now define their own timestamp formats with the
'timestamp-format' field.
Fixes:
* Autotools scripts overhaul.
* Added a configure option to disable linking with libtinfo. The newer
versions of ncurses don't require it, however the build silently pulls
it in as a dependency, if it is available on the system. This can be
explicitly disabled using the '--disable-tinfo' option during configure.
* Fixed the configure script behavior to ignore the values specified using
the CFLAGS and LDFLAGS environment variables while searching for sqlite3
when '--with-sqlite3' switch was specified without the prefix.
* The configure script now recognizes libeditline symlink'ed to masquerade
as libreadline. This previously used to cause problems at compile time,
specially on OS X. If you come across this error, use the
'--with-readline=prefix' switch to specify the path to the correct
location of libreadline.
* The order that log formats are tried against a log file is now
automatically determined so that more specific formats are tested
before more general ones. The order is determined on startup based on
how each format matches each other formats sample lines.
* Command files (i.e. those executed via the '-f' flag) now support
commands/queries that span more than one line.
* Added more log levels: stats, debug2 - debug5.
lnav v0.7.2:
* Added log formats for vdsm, openstack, and the vmkernel.
* Added a "lo-fi" mode (L hotkey) that dumps the displayed log lines
to the terminal without any decorations. The write-to, write-json-to,
and write-csv-to commands will also write their output to the terminal
when passed '-' as the file name. This mode can be useful for copying
plain text lines to the clipboard.
* (OS X) Text search strings are copied to the system's "find" clipboard.
Also, when starting a new search, the current value in the "find"
clipboard can be tab-completed.
lnav v0.7.1:
Features:
* Added an 'environ' SQL table that reflects lnav's environment
variables. The table can be read and written to using SQL
SELECT, INSERT, UPDATE, and DELETE statements. Setting variables
can be a way to use SQL query results in lnav commands.
* Added a 'jget' SQLite function that can extract fields from a JSON-
encoded value.
* Added log formats for the OpenAM identity provider.
* Added a 'clear-highlight' command to clear previous calls to the
'highlight' command.
* Fixed some performance bugs in indexing JSON log formats. Loading
times should be at least five times faster.
* Filtering performance should be improved so that enabling/disabling
filters should be almost instantaneous.
* The filter-in, filter-out, and highlight commands now support
tab-completion of text in the current view.
* Add a '-i' flag that installs format files in: ~/.lnav/formats/installed
lnav v0.7.0:
Features:
* Add the '.schema' SQL command to open a view that displays the schema
for the internal tables and any attached databases. If lnav was only
executed with a SQLite database and no text files, this view will open
by default.
* The scroll bar now indicates the location of errors/warnings, search
hits, and bookmarks.
* The xterm title is update to reflect the file name for the top line
in the view.
* Added a "headless" mode so that you can execute commands and run SQL
queries from the command-line without having to do it from the curses
UI.
* When doing a search or SQL query, any text that is currently being
displayed can be tab-completed.
* The '-H' option was added so you can view the internal help text.
* Added the 'g/G' hotkeys to move to the top/bottom of the file.
* Added a 'log_mark' column to the log tables that indicates whether or
not a log message is bookmarked. The field is writable, so you can
bookmark lines using an SQL UPDATE query.
* Added syntax-highlighting when editing SQL queries or search regexes.
* Added a "write-json-to" command that writes the result of a SQL query
to a JSON-formatted file.
* The "elapsed time" column now uses red/green coloring to indicate
sharp changes in the message rate.
* Added a "set-min-log-level" command to filter out log messages that
are below a given level.
Fixes:
* Performance improvements.
* Multi-line filtering has been fixed.
* A collator has been added to the log_level column in the log tables
so that you can write expressions like "log_level > 'warning'".
* The log_time datetime format now matches what is returned by
"datetime('now')" so that collating works correctly.
* If a search string is not valid PCRE syntax, a search is done for
the exact string instead of just returning an error.
* Static-linking has been cleaned up.
* OpenSSL is no longer a requirement.
* Alpha support for Windows/cygwin.
* Environment variables can now be accessed in SQL queries using
the syntax: $VAR_NAME
* An internal log is kept and written out on a crash.
* Partition bookmarks are now tracked separately from regular user
bookmarks. You can start a partition with the 'partition-name'
command and remove it with the 'clear-partition' command.
* Improved display of possible matches during tab-completion in the
command-prompt. The matches are now shown in a separate view and
pressing tab repeatedly will scroll through the view.
* The "open" command now does shell word expansion for file names.
* More config directory paths have been added: /etc/lnav,
$prefix/etc/lnav, and directories passed on the command-line with -I.
lnav v0.6.2:
Features:
* Word-wrap support.
Fixes:
* Fix some OS X Mavericks build/runtime issues.
lnav v0.6.1:
Features:
* Support for JSON-encoded log files.
Fixes:
* Some minor fixes and performance improvements.
lnav v0.6.0:
Features:
* Custom log formats and more builtin formats
* Automatic extraction of data from logs
* UI improvements, support for 256 color terminals
lnav v0.5.1:
Features:
* Added the '-t' and '-w' options which can be used to prepend a
timestamp to any data piped in on stdin and to specify a file to
write the contents of stdin to.
Fixes:
* Cleanup for packaging.
lnav v0.5.0:
Features:
* Files can be specified on the command-line using wildcards so that
new files are automatically loaded. Directories can also be passed
as command-line arguments to read all of the files in the directory.
* Builds on cygwin again.
* Added the 'C' hotkey to clear any existing user bookmarks.
* Added experimental support for accepting input from mice.
Fixes:
* Internal cleanup.
* Copying to the clipboard on OS X is now supported.
* Many bug fixes.
lnav v0.4.0:
Features:
* Files that are not recognized as containing log messages have been
broken out to a separate text files view. You can flip between the
log view and the text file view with the 't' hotkey. When viewing
text files, the 'f' hotkey will switch between files.
* Files compressed with bzip2 are recognized and decompressed on the
fly.
* Added a "session" file and command for storing commands that should
be executed on startup. For example, if you always want some
highlighting to be done, you can add that command to the session
file.
Fixes:
* Add some more log file formats for generic log files.
* Performance improvements for compressed files.
* Works on OS X now.
lnav v0.3.0:
Changes:
* The hotkey for the SQL view was changed to 'v' and 'V' from '.'.
Features:
* You can now switch between the SQL result view and the log view while
keeping the top of the views in sync with the "log_line" column.
Fixes:
* The "log_line" column is no longer included in the SQL result view's
stacked bar graph.
* Added a "warnings" count to the histogram view.

1000
NEWS.md Normal file

File diff suppressed because it is too large Load Diff

7
README
View File

@ -15,10 +15,10 @@ efficiently zero in on problems.
PREREQUISITES
-------------
The following software packages are required to build lnav:
The following software packages are required to build/run lnav:
gcc/clang - A C++14-compatible compiler.
libpcre - The Perl Compatible Regular Expression (PCRE) library.
libpcre2 - The Perl Compatible Regular Expression v2 (PCRE2) library.
sqlite - The SQLite database engine. Version 3.9.0 or higher is required.
ncurses - The ncurses text UI library.
readline - The readline line editing library.
@ -28,6 +28,7 @@ The following software packages are required to build lnav:
libcurl - The cURL library for downloading files from URLs. Version
7.23.0 or higher is required.
libarchive - The libarchive library for opening archive files, like zip/tgz.
wireshark - The 'tshark' program is used to interpret pcap files.
INSTALLATION
@ -35,6 +36,8 @@ INSTALLATION
Lnav follows the usual GNU style for configuring and installing software:
Run "./autogen.sh" if compiling from a cloned repository.
$ ./configure
$ make
$ sudo make install

View File

@ -1,7 +1,11 @@
<!-- This is a comment for testing purposes -->
[![Build](https://github.com/tstack/lnav/workflows/ci-build/badge.svg)](https://github.com/tstack/lnav/actions?query=workflow%3Aci-build)
[![Docs](https://readthedocs.org/projects/lnav/badge/?version=latest&style=plastic)](https://docs.lnav.org)
[![Coverage Status](https://coveralls.io/repos/github/tstack/lnav/badge.svg?branch=master)](https://coveralls.io/github/tstack/lnav?branch=master)
[![lnav](https://snapcraft.io//lnav/badge.svg)](https://snapcraft.io/lnav)
[![lnav](https://snapcraft.io/lnav/badge.svg)](https://snapcraft.io/lnav)
[<img src="https://assets-global.website-files.com/6257adef93867e50d84d30e2/62594fddd654fc29fcc07359_cb48d2a8d4991281d7a6a95d2f58195e.svg" height="20"/>](https://discord.gg/erBPnKwz7R)
_This is the source repository for **lnav**, visit [https://lnav.org](https://lnav.org) for a high level overview._
@ -79,7 +83,7 @@ $ journalctl -o json | lnav
In case some MESSAGE fields contain special characters such as
ANSI color codes which are considered as unprintable by journalctl,
specifying `journalctl`'s `-a` option might be preferable in order
to output those messages still in a non binary representation:
to output those messages still in a non-binary representation:
```
$ journalctl -a -o json | lnav
@ -99,6 +103,15 @@ efficiency you may want to limit the number of log lines fed into
In case of a persistent journal, you may want to limit the number
of log lines fed into `lnav` via `journalctl`'s `-b` option.
## Support
Please file issues on this repository or use the discussions section.
The following alternatives are also available:
- [support@lnav.org](mailto:support@lnav.org)
- [Discord](https://discord.gg/erBPnKwz7R)
- [Google Groups](https://groups.google.com/g/lnav)
## Links
- [Main Site](https://lnav.org)
@ -116,7 +129,7 @@ of log lines fed into `lnav` via `journalctl`'s `-b` option.
The following software packages are required to build lnav:
- gcc/clang - A C++14-compatible compiler.
- libpcre - The Perl Compatible Regular Expression (PCRE) library.
- libpcre2 - The Perl Compatible Regular Expression v2 (PCRE2) library.
- sqlite - The SQLite database engine. Version 3.9.0 or higher is required.
- ncurses - The ncurses text UI library.
- readline - The readline line editing library.
@ -124,6 +137,7 @@ The following software packages are required to build lnav:
- bz2 - The bzip2 compression library.
- libcurl - The cURL library for downloading files from URLs. Version 7.23.0 or higher is required.
- libarchive - The libarchive library for opening archive files, like zip/tgz.
- wireshark - The 'tshark' program is used to interpret pcap files.
#### Build
@ -131,7 +145,7 @@ Lnav follows the usual GNU style for configuring and installing software:
Run `./autogen.sh` if compiling from a cloned repository.
```
```console
$ ./configure
$ make
$ sudo make install

View File

@ -3,6 +3,9 @@
top_srcdir="@abssrcdir@"
export top_srcdir
top_srcdir_parent=`dirname ${top_srcdir}`
export top_srcdir_parent
srcdir="@abssrcdir@/test"
export srcdir
@ -26,6 +29,9 @@ export BZIP2_CMD
XZ_CMD="@XZ_CMD@"
export XZ_CMD
TSHARK_CMD="@TSHARK_CMD@"
export TSHARK_CMD
LIBARCHIVE_LIBS="@LIBARCHIVE_LIBS@"
export LIBARCHIVE_LIBS
@ -39,6 +45,8 @@ test_file_base=`basename $1`
# The current test number for shell based tests.
test_num=0
test_hash=""
lnav_test="${top_builddir}/src/lnav-test"
export lnav_test
@ -54,10 +62,17 @@ export SFTP_TEST_URL
HAVE_SQLITE3_VALUE_SUBTYPE="@HAVE_SQLITE3_VALUE_SUBTYPE@"
export HAVE_SQLITE3_VALUE_SUBTYPE
HAVE_SQLITE3_ERROR_OFFSET="@HAVE_SQLITE3_ERROR_OFFSET@"
export HAVE_SQLITE3_ERROR_OFFSET
## BEGIN Functions
LAST_TEST=""
LAST_CAP_TEST=()
has_errors=""
#
# Run a test case and capture its standard out and standard err.
#
@ -70,11 +85,73 @@ LAST_TEST=""
# run_test rktimes -V
#
run_test() {
LAST_TEST="test: $@"
printf "%s \033[0;35m=============================================================\033[0m\n" $(date -Iseconds)
LAST_TEST=("test: $@")
echo "${LAST_TEST[@]}"
export test_num=`expr ${test_num} \+ 1`
"$@" > ${test_file_base}_${test_num}.tmp 2> ${test_file_base}_${test_num}.err
}
run_cap_test() {
LAST_CAP_TEST=("test: $@")
local full_cmd=$(echo "${LAST_CAP_TEST[@]}" | sed -e "s;${test_dir};{test_dir};g" -e "s;${top_srcdir};{top_srcdir};g")
export test_hash=$(echo "${full_cmd}" | shasum | cut -f 1 -d ' ')
echo "${full_cmd}" > ${test_file_base}_${test_hash}.cmd
"$@" > ${test_file_base}_${test_hash}.out 2> ${test_file_base}_${test_hash}.err
sed -ibak \
-e "s;${test_dir};{test_dir};g" \
-e "s;${builddir};{test_dir};g" \
-e "s;${top_srcdir};{top_srcdir};g" \
-e "s;${top_srcdir_parent};{top_srcdir_parent};g" \
${test_file_base}_${test_hash}.out
echo
printf "%s \033[0;35m=============================================================\033[0m\n" $(date -Iseconds)
printf '\033[0;35mCommand\033[0m: %s\n' "${full_cmd}"
printf '\033[0;32mBEGIN\033[0m %s\n' "${test_file_base}_${test_hash}.out"
cat "${test_file_base}_${test_hash}.out"
printf '\033[0;32mEND\033[0m %s\n' "${test_file_base}_${test_hash}.out"
if test -f ${srcdir}/expected/${test_file_base}_${test_hash}.out; then
diff -w -u \
${srcdir}/expected/${test_file_base}_${test_hash}.out \
${test_file_base}_${test_hash}.out \
> ${test_file_base}_${test_hash}.diff
if test $? -ne 0; then
echo OUT: "${full_cmd}"
cat ${test_file_base}_${test_hash}.diff
echo "FAIL! EXPECTED OUT DIFF"
export has_errors="yes"
fi
else
echo "FAIL! EXPECTED OUT MISSING -- ${srcdir}/expected/${test_file_base}_${test_hash}.out"
export has_errors="yes"
fi
sed -ibak -E \
-e "s;${test_dir};{test_dir};g" \
-e "s;${builddir};{builddir};g" \
-e "s;${top_srcdir};{top_srcdir};g" \
-e 's;"errorId":".+";;g' \
${test_file_base}_${test_hash}.err
printf '\033[0;31mBEGIN\033[0m %s\n' "${test_file_base}_${test_hash}.err"
cat "${test_file_base}_${test_hash}.err"
printf '\033[0;31mEND\033[0m %s\n' "${test_file_base}_${test_hash}.err"
if test -f ${srcdir}/expected/${test_file_base}_${test_hash}.err; then
diff -w -u ${srcdir}/expected/${test_file_base}_${test_hash}.err \
${test_file_base}_${test_hash}.err \
> ${test_file_base}_${test_hash}.err.diff
if test $? -ne 0; then
echo ERR: "${full_cmd}"
cat ${test_file_base}_${test_hash}.err.diff
echo "FAIL! EXPECTED ERR DIFF"
export has_errors="yes"
fi
else
echo "FAIL! EXPECTED ERR MISSING"
export has_errors="yes"
fi
}
#
# Check the output generated by a run_test() call.
#
@ -97,7 +174,7 @@ check_output() {
${test_file_base}_${test_num}.tmp
diff -w -u - ${test_file_base}_${test_num}.tmp > ${test_file_base}_${test_num}.diff
if test $? -ne 0; then
echo $LAST_TEST
echo "${LAST_TEST[@]}"
echo $1
cat ${test_file_base}_${test_num}.diff
exit 1
@ -107,7 +184,7 @@ check_output() {
check_output_ws() {
diff -u - ${test_file_base}_${test_num}.tmp > ${test_file_base}_${test_num}.diff
if test $? -ne 0; then
echo $LAST_TEST
echo "${LAST_TEST[@]}"
echo $1
cat ${test_file_base}_${test_num}.diff
exit 1
@ -130,7 +207,7 @@ check_error_output() {
diff -w -u - ${test_file_base}_${test_num}.err \
> ${test_file_base}_${test_num}.err.diff
if test $? -ne 0; then
echo $LAST_TEST
echo "${LAST_TEST[@]}"
echo $1
cat ${test_file_base}_${test_num}.err.diff
exit 1
@ -188,3 +265,11 @@ else
shift
. ${test_file}
fi
cleanup() {
if test "${has_errors}"x = "yes"x; then
exit 1
fi
}
trap "cleanup" EXIT

View File

@ -1,126 +0,0 @@
# aminclude_static.am generated automatically by Autoconf
# from AX_AM_MACROS_STATIC on Mon Oct 18 09:00:48 PDT 2021
# Code coverage
#
# Optional:
# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
# Multiple directories may be specified, separated by whitespace.
# (Default: $(top_builddir))
# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
# by lcov for code coverage. (Default:
# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
# reports to be created. (Default:
# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage,
# set to 0 to disable it and leave empty to stay with the default.
# (Default: empty)
# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov
# instances. (Default: based on )
# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov
# instances. (Default: )
# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov
# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the
# collecting lcov instance. (Default: )
# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov
# instance. (Default: )
# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering
# lcov instance. (Default: empty)
# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov
# instance. (Default: )
# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the
# genhtml instance. (Default: based on )
# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
# instance. (Default: )
# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
#
# The generated report will be titled using the $(PACKAGE_NAME) and
# $(PACKAGE_VERSION). In order to add the current git hash to the title,
# use the git-version-gen script, available online.
# Optional variables
# run only on top dir
if CODE_COVERAGE_ENABLED
ifeq ($(abs_builddir), $(abs_top_builddir))
CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
CODE_COVERAGE_BRANCH_COVERAGE ?=
CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)"
CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?=
CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=$(if $(CODE_COVERAGE_BRANCH_COVERAGE),--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
CODE_COVERAGE_IGNORE_PATTERN ?=
GITIGNOREFILES := $(GITIGNOREFILES) $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V))
code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY))
code_coverage_v_lcov_cap_0 = @echo " LCOV --capture" $(CODE_COVERAGE_OUTPUT_FILE);
code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V))
code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY))
code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN);
code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V))
code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY))
code_coverage_v_genhtml_0 = @echo " GEN " "$(CODE_COVERAGE_OUTPUT_DIRECTORY)";
code_coverage_quiet = $(code_coverage_quiet_$(V))
code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
code_coverage_quiet_0 = --quiet
# sanitizes the test-name: replaces with underscores: dashes and dots
code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1)))
# Use recursive makes in order to ignore errors during check
check-code-coverage:
-$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
# Capture code coverage data
code-coverage-capture: code-coverage-capture-hook
$(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS)
$(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS)
-@rm -f "$(CODE_COVERAGE_OUTPUT_FILE).tmp"
$(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
@echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
code-coverage-clean:
-$(LCOV) --directory $(top_builddir) -z
-rm -rf "$(CODE_COVERAGE_OUTPUT_FILE)" "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "$(CODE_COVERAGE_OUTPUT_DIRECTORY)"
-find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete
code-coverage-dist-clean:
AM_DISTCHECK_CONFIGURE_FLAGS := $(AM_DISTCHECK_CONFIGURE_FLAGS) --disable-code-coverage
else # ifneq ($(abs_builddir), $(abs_top_builddir))
check-code-coverage:
code-coverage-capture: code-coverage-capture-hook
code-coverage-clean:
code-coverage-dist-clean:
endif # ifeq ($(abs_builddir), $(abs_top_builddir))
else #! CODE_COVERAGE_ENABLED
# Use recursive makes in order to ignore errors during check
check-code-coverage:
@echo "Need to reconfigure with --enable-code-coverage"
# Capture code coverage data
code-coverage-capture: code-coverage-capture-hook
@echo "Need to reconfigure with --enable-code-coverage"
code-coverage-clean:
code-coverage-dist-clean:
endif #CODE_COVERAGE_ENABLED
# Hook rule executed before code-coverage-capture, overridable by the user
code-coverage-capture-hook:
.PHONY: check-code-coverage code-coverage-capture code-coverage-dist-clean code-coverage-clean code-coverage-capture-hook

View File

@ -1,4 +1,5 @@
version: "{build}"
image: Visual Studio 2022
environment:
matrix:
@ -8,7 +9,7 @@ environment:
cygsetup: setup-x86_64.exe
install:
- C:\%cygwin%\%cygsetup% -qnNdO -R C:/%cygwin% -s http://cygwin.mirror.constant.com -l C:/%cygwin%/var/cache/setup -P libpcre-devel -P libncurses-devel -P libreadline-devel -P zlib-devel -P libbz2-devel -P libsqlite3-devel
- C:\%cygwin%\%cygsetup% -qnNdOX -R C:/%cygwin% -l C:/%cygwin%/var/cache/setup -P libpcre2-devel -P libncurses-devel -P libreadline-devel -P zlib-devel -P libbz2-devel -P libsqlite3-devel -P libcurl-devel -P libarchive-devel
build_script:
- C:\%cygwin%\bin\sh -lc "uname -a && gcc --version && cd /cygdrive/c/projects/lnav && ./autogen.sh && ./configure && make && strip src/lnav.exe && ldd src/lnav.exe"

15
cleanup_expected.sh Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
srcdir="$1"
builddir="$2"
for fname in "${srcdir}"/expected/*.out; do
stem=$(basename "$fname" | sed -e 's/.out$//')
if ! test -f "${builddir}/$stem.cmd"; then
echo "removing $fname"
guilt rm "$fname"
echo "removing ${srcdir}/expected/${stem}.err"
guilt rm "${srcdir}/expected/${stem}.err"
fi
done

33
cmake/coverage.cmake Normal file
View File

@ -0,0 +1,33 @@
# ---- Variables ----
# We use variables separate from what CTest uses, because those have
# customization issues
set(
COVERAGE_TRACE_COMMAND
lcov -c -q
-o "${PROJECT_BINARY_DIR}/coverage.info"
-d "${PROJECT_BINARY_DIR}"
--include "${PROJECT_SOURCE_DIR}/*"
CACHE STRING
"; separated command to generate a trace for the 'coverage' target"
)
set(
COVERAGE_HTML_COMMAND
genhtml --legend -f -q
"${PROJECT_BINARY_DIR}/coverage.info"
-p "${PROJECT_SOURCE_DIR}"
-o "${PROJECT_BINARY_DIR}/coverage_html"
CACHE STRING
"; separated command to generate an HTML report for the 'coverage' target"
)
# ---- Coverage target ----
add_custom_target(
coverage
COMMAND ${COVERAGE_TRACE_COMMAND}
COMMAND ${COVERAGE_HTML_COMMAND}
COMMENT "Generating coverage report"
VERBATIM
)

32
cmake/dev-mode.cmake Normal file
View File

@ -0,0 +1,32 @@
include(cmake/folders.cmake)
include(CTest)
if(BUILD_TESTING)
add_subdirectory(test)
endif()
add_custom_target(
run-exe
COMMAND lnav
VERBATIM
)
add_dependencies(run-exe lnav)
option(BUILD_MCSS_DOCS "Build documentation using Doxygen and m.css" OFF)
if(BUILD_MCSS_DOCS)
include(cmake/docs.cmake)
endif()
option(ENABLE_COVERAGE "Enable coverage support separate from CTest's" OFF)
if(ENABLE_COVERAGE)
include(cmake/coverage.cmake)
endif()
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
include(cmake/open-cpp-coverage.cmake OPTIONAL)
endif()
include(cmake/lint-targets.cmake)
include(cmake/spell-targets.cmake)
add_folders(Project)

112
cmake/docs-ci.cmake Normal file
View File

@ -0,0 +1,112 @@
cmake_minimum_required(VERSION 3.14)
foreach(var IN ITEMS PROJECT_BINARY_DIR PROJECT_SOURCE_DIR)
if(NOT DEFINED "${var}")
message(FATAL_ERROR "${var} must be defined")
endif()
endforeach()
set(bin "${PROJECT_BINARY_DIR}")
set(src "${PROJECT_SOURCE_DIR}")
# ---- Dependencies ----
set(mcss_SOURCE_DIR "${bin}/docs/.ci")
if(NOT IS_DIRECTORY "${mcss_SOURCE_DIR}")
file(MAKE_DIRECTORY "${mcss_SOURCE_DIR}")
file(
DOWNLOAD
https://github.com/friendlyanon/m.css/releases/download/release-1/mcss.zip
"${mcss_SOURCE_DIR}/mcss.zip"
STATUS status
EXPECTED_MD5 00cd2757ebafb9bcba7f5d399b3bec7f
)
if(NOT status MATCHES "^0;")
message(FATAL_ERROR "Download failed with ${status}")
endif()
execute_process(
COMMAND "${CMAKE_COMMAND}" -E tar xf mcss.zip
WORKING_DIRECTORY "${mcss_SOURCE_DIR}"
RESULT_VARIABLE result
)
if(NOT result EQUAL "0")
message(FATAL_ERROR "Extraction failed with ${result}")
endif()
file(REMOVE "${mcss_SOURCE_DIR}/mcss.zip")
endif()
find_program(Python3_EXECUTABLE NAMES python3 python)
if(NOT Python3_EXECUTABLE)
message(FATAL_ERROR "Python executable was not found")
endif()
# ---- Process project() call in CMakeLists.txt ----
file(READ "${src}/CMakeLists.txt" content)
string(FIND "${content}" "project(" index)
if(index EQUAL "-1")
message(FATAL_ERROR "Could not find \"project(\"")
endif()
string(SUBSTRING "${content}" "${index}" -1 content)
string(FIND "${content}" "\n)\n" index)
if(index EQUAL "-1")
message(FATAL_ERROR "Could not find \"\\n)\\n\"")
endif()
string(SUBSTRING "${content}" 0 "${index}" content)
file(WRITE "${bin}/docs-ci.project.cmake" "docs_${content}\n)\n")
macro(list_pop_front list out)
list(GET "${list}" 0 "${out}")
list(REMOVE_AT "${list}" 0)
endmacro()
function(docs_project name)
cmake_parse_arguments(PARSE_ARGV 1 "" "" "VERSION;DESCRIPTION;HOMEPAGE_URL" LANGUAGES)
set(PROJECT_NAME "${name}" PARENT_SCOPE)
if(DEFINED _VERSION)
set(PROJECT_VERSION "${_VERSION}" PARENT_SCOPE)
string(REGEX MATCH "^[0-9]+(\\.[0-9]+)*" versions "${_VERSION}")
string(REPLACE . ";" versions "${versions}")
set(suffixes MAJOR MINOR PATCH TWEAK)
while(NOT versions STREQUAL "" AND NOT suffixes STREQUAL "")
list_pop_front(versions version)
list_pop_front(suffixes suffix)
set("PROJECT_VERSION_${suffix}" "${version}" PARENT_SCOPE)
endwhile()
endif()
if(DEFINED _DESCRIPTION)
set(PROJECT_DESCRIPTION "${_DESCRIPTION}" PARENT_SCOPE)
endif()
if(DEFINED _HOMEPAGE_URL)
set(PROJECT_HOMEPAGE_URL "${_HOMEPAGE_URL}" PARENT_SCOPE)
endif()
endfunction()
include("${bin}/docs-ci.project.cmake")
# ---- Generate docs ----
if(NOT DEFINED DOXYGEN_OUTPUT_DIRECTORY)
set(DOXYGEN_OUTPUT_DIRECTORY "${bin}/docs")
endif()
set(out "${DOXYGEN_OUTPUT_DIRECTORY}")
foreach(file IN ITEMS Doxyfile conf.py)
configure_file("${src}/docs/${file}.in" "${bin}/docs/${file}" @ONLY)
endforeach()
set(mcss_script "${mcss_SOURCE_DIR}/documentation/doxygen.py")
set(config "${bin}/docs/conf.py")
file(REMOVE_RECURSE "${out}/html" "${out}/xml")
execute_process(
COMMAND "${Python3_EXECUTABLE}" "${mcss_script}" "${config}"
WORKING_DIRECTORY "${bin}/docs"
RESULT_VARIABLE result
)
if(NOT result EQUAL "0")
message(FATAL_ERROR "m.css returned with ${result}")
endif()

46
cmake/docs.cmake Normal file
View File

@ -0,0 +1,46 @@
# ---- Dependencies ----
set(extract_timestamps "")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24")
set(extract_timestamps DOWNLOAD_EXTRACT_TIMESTAMP YES)
endif ()
include(FetchContent)
FetchContent_Declare(
mcss URL
https://github.com/friendlyanon/m.css/releases/download/release-1/mcss.zip
URL_MD5 00cd2757ebafb9bcba7f5d399b3bec7f
SOURCE_DIR "${PROJECT_BINARY_DIR}/mcss"
UPDATE_DISCONNECTED YES
${extract_timestamps}
)
FetchContent_MakeAvailable(mcss)
find_package(Python3 3.6 REQUIRED)
# ---- Declare documentation target ----
set(
DOXYGEN_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/docs"
CACHE PATH "Path for the generated Doxygen documentation"
)
set(working_dir "${PROJECT_BINARY_DIR}/docs")
foreach (file IN ITEMS Doxyfile conf.py)
configure_file("docs/${file}.in" "${working_dir}/${file}" @ONLY)
endforeach ()
set(mcss_script "${mcss_SOURCE_DIR}/documentation/doxygen.py")
set(config "${working_dir}/conf.py")
add_custom_target(
docs
COMMAND "${CMAKE_COMMAND}" -E remove_directory
"${DOXYGEN_OUTPUT_DIRECTORY}/html"
"${DOXYGEN_OUTPUT_DIRECTORY}/xml"
COMMAND "${Python3_EXECUTABLE}" "${mcss_script}" "${config}"
COMMENT "Building documentation using Doxygen and m.css"
WORKING_DIRECTORY "${working_dir}"
VERBATIM
)

21
cmake/folders.cmake Normal file
View File

@ -0,0 +1,21 @@
set_property(GLOBAL PROPERTY USE_FOLDERS YES)
# Call this function at the end of a directory scope to assign a folder to
# targets created in that directory. Utility targets will be assigned to the
# UtilityTargets folder, otherwise to the ${name}Targets folder. If a target
# already has a folder assigned, then that target will be skipped.
function(add_folders name)
get_property(targets DIRECTORY PROPERTY BUILDSYSTEM_TARGETS)
foreach(target IN LISTS targets)
get_property(folder TARGET "${target}" PROPERTY FOLDER)
if(DEFINED folder)
continue()
endif()
set(folder Utility)
get_property(type TARGET "${target}" PROPERTY TYPE)
if(NOT type STREQUAL "UTILITY")
set(folder "${name}")
endif()
set_property(TARGET "${target}" PROPERTY FOLDER "${folder}Targets")
endforeach()
endfunction()

44
cmake/install-rules.cmake Normal file
View File

@ -0,0 +1,44 @@
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
# find_package(<package>) call for consumers to find this project
set(package lnav)
install(
TARGETS lnav
RUNTIME COMPONENT lnav_Runtime
)
write_basic_package_version_file(
"${package}ConfigVersion.cmake"
COMPATIBILITY SameMajorVersion
)
# Allow package maintainers to freely override the path for the configs
set(
lnav_INSTALL_CMAKEDIR "${CMAKE_INSTALL_DATADIR}/${package}"
CACHE PATH "CMake package config location relative to the install prefix"
)
mark_as_advanced(lnav_INSTALL_CMAKEDIR)
install(
FILES "${PROJECT_BINARY_DIR}/${package}ConfigVersion.cmake"
DESTINATION "${lnav_INSTALL_CMAKEDIR}"
COMPONENT lnav_Development
)
# Export variables for the install script to use
install(CODE "
set(lnav_NAME [[$<TARGET_FILE_NAME:lnav>]])
set(lnav_INSTALL_CMAKEDIR [[${lnav_INSTALL_CMAKEDIR}]])
set(CMAKE_INSTALL_BINDIR [[${CMAKE_INSTALL_BINDIR}]])
" COMPONENT lnav_Development)
install(
SCRIPT cmake/install-script.cmake
COMPONENT lnav_Development
)
if(PROJECT_IS_TOP_LEVEL)
include(CPack)
endif()

View File

@ -0,0 +1,18 @@
file(
RELATIVE_PATH relative_path
"/${lnav_INSTALL_CMAKEDIR}"
"/${CMAKE_INSTALL_BINDIR}/${lnav_NAME}"
)
get_filename_component(prefix "${CMAKE_INSTALL_PREFIX}" ABSOLUTE)
set(config_dir "${prefix}/${lnav_INSTALL_CMAKEDIR}")
set(config_file "${config_dir}/lnavConfig.cmake")
message(STATUS "Installing: ${config_file}")
file(WRITE "${config_file}" "\
set(
LNAV_EXECUTABLE
\"\${CMAKE_CURRENT_LIST_DIR}/${relative_path}\"
CACHE FILEPATH \"Path to the lnav executable\"
)
")

32
cmake/lint-targets.cmake Normal file
View File

@ -0,0 +1,32 @@
set(
FORMAT_PATTERNS
src/*.cc src/*.hh
test/*.cc test/*.hh
CACHE STRING
"; separated patterns relative to the project source dir to format"
)
set(FORMAT_COMMAND clang-format CACHE STRING "Formatter to use")
add_custom_target(
format-check
COMMAND "${CMAKE_COMMAND}"
-D "FORMAT_COMMAND=${FORMAT_COMMAND}"
-D "PATTERNS=${FORMAT_PATTERNS}"
-P "${PROJECT_SOURCE_DIR}/cmake/lint.cmake"
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
COMMENT "Linting the code"
VERBATIM
)
add_custom_target(
format-fix
COMMAND "${CMAKE_COMMAND}"
-D "FORMAT_COMMAND=${FORMAT_COMMAND}"
-D "PATTERNS=${FORMAT_PATTERNS}"
-D FIX=YES
-P "${PROJECT_SOURCE_DIR}/cmake/lint.cmake"
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
COMMENT "Fixing the code"
VERBATIM
)

50
cmake/lint.cmake Normal file
View File

@ -0,0 +1,50 @@
cmake_minimum_required(VERSION 3.14)
macro(default name)
if(NOT DEFINED "${name}")
set("${name}" "${ARGN}")
endif()
endmacro()
default(FORMAT_COMMAND clang-format)
default(
PATTERNS
src/*.cc src/*.hh
test/*.cc test/*.hh
)
default(FIX NO)
set(flag --output-replacements-xml)
set(args OUTPUT_VARIABLE output)
if(FIX)
set(flag -i)
set(args "")
endif()
file(GLOB_RECURSE files ${PATTERNS})
set(badly_formatted "")
set(output "")
string(LENGTH "${CMAKE_SOURCE_DIR}/" path_prefix_length)
foreach(file IN LISTS files)
execute_process(
COMMAND "${FORMAT_COMMAND}" --style=file "${flag}" "${file}"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE result
${args}
)
if(NOT result EQUAL "0")
message(FATAL_ERROR "'${file}': formatter returned with ${result}")
endif()
if(NOT FIX AND output MATCHES "\n<replacement offset")
string(SUBSTRING "${file}" "${path_prefix_length}" -1 relative_file)
list(APPEND badly_formatted "${relative_file}")
endif()
set(output "")
endforeach()
if(NOT badly_formatted STREQUAL "")
list(JOIN badly_formatted "\n" bad_list)
message("The following files are badly formatted:\n\n${bad_list}\n")
message(FATAL_ERROR "Run again with FIX=YES to fix these files.")
endif()

View File

@ -0,0 +1,31 @@
# Example file to run OpenCppCoverage on Windows
include(ProcessorCount)
ProcessorCount(N)
file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/opencppcoverage")
# Convert delimiters to Windows ones
string(REPLACE "/" "\\" binary_dir "${PROJECT_BINARY_DIR}")
string(REPLACE "/" "\\" source_dir "${PROJECT_SOURCE_DIR}")
string(REPLACE "/" "\\" ctest "${CMAKE_CTEST_COMMAND}")
add_custom_target(
win-cov
COMMAND OpenCppCoverage -q
# We want coverage from the child processes of CTest
--cover_children
# Subdirectory where the tests reside in the binary directory
--modules "${binary_dir}\\test"
# This command is for the developer, so export as html instead of cobertura
--export_type "html:${binary_dir}\\opencppcoverage"
# Source (not header) file locations
--sources "${source_dir}\\source"
--sources "${source_dir}\\test\\source"
# Working directory for CTest, which should be the binary directory
--working_dir "${binary_dir}"
# OpenCppCoverage should be run only with the Debug configuration tests
-- "${ctest}" -C Debug --output-on-failure -j "${N}"
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}"
VERBATIM
)

10
cmake/prelude.cmake Normal file
View File

@ -0,0 +1,10 @@
# ---- In-source guard ----
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(
FATAL_ERROR
"In-source builds are not supported. "
"Please read the BUILDING document before trying to build this project. "
"You may need to delete 'CMakeCache.txt' and 'CMakeFiles/' first."
)
endif()

View File

@ -0,0 +1,6 @@
# This variable is set by project() in CMake 3.21+
string(
COMPARE EQUAL
"${CMAKE_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}"
PROJECT_IS_TOP_LEVEL
)

22
cmake/spell-targets.cmake Normal file
View File

@ -0,0 +1,22 @@
set(SPELL_COMMAND codespell CACHE STRING "Spell checker to use")
add_custom_target(
spell-check
COMMAND "${CMAKE_COMMAND}"
-D "SPELL_COMMAND=${SPELL_COMMAND}"
-P "${PROJECT_SOURCE_DIR}/cmake/spell.cmake"
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
COMMENT "Checking spelling"
VERBATIM
)
add_custom_target(
spell-fix
COMMAND "${CMAKE_COMMAND}"
-D "SPELL_COMMAND=${SPELL_COMMAND}"
-D FIX=YES
-P "${PROJECT_SOURCE_DIR}/cmake/spell.cmake"
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
COMMENT "Fixing spelling errors"
VERBATIM
)

29
cmake/spell.cmake Normal file
View File

@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 3.14)
macro(default name)
if(NOT DEFINED "${name}")
set("${name}" "${ARGN}")
endif()
endmacro()
default(SPELL_COMMAND codespell)
default(FIX NO)
set(flag "")
if(FIX)
set(flag -w)
endif()
execute_process(
COMMAND "${SPELL_COMMAND}" ${flag}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE result
)
if(result EQUAL "65")
message(FATAL_ERROR "Run again with FIX=YES to fix these errors.")
elseif(result EQUAL "64")
message(FATAL_ERROR "Spell checker printed the usage info. Bad arguments?")
elseif(NOT result EQUAL "0")
message(FATAL_ERROR "Spell checker returned with ${result}")
endif()

28
cmake/variables.cmake Normal file
View File

@ -0,0 +1,28 @@
# ---- Developer mode ----
# Developer mode enables targets and code paths in the CMake scripts that are
# only relevant for the developer(s) of lnav
# Targets necessary to build the project must be provided unconditionally, so
# consumers can trivially build and package the project
if(PROJECT_IS_TOP_LEVEL)
option(lnav_DEVELOPER_MODE "Enable developer mode" OFF)
endif()
# ---- Warning guard ----
# target_include_directories with the SYSTEM modifier will request the compiler
# to omit warnings from the provided paths, if the compiler supports that
# This is to provide a user experience similar to find_package when
# add_subdirectory or FetchContent is used to consume this project
set(warning_guard "")
if(NOT PROJECT_IS_TOP_LEVEL)
option(
lnav_INCLUDES_WITH_SYSTEM
"Use SYSTEM modifier for lnav's includes, disabling warnings"
ON
)
mark_as_advanced(lnav_INCLUDES_WITH_SYSTEM)
if(lnav_INCLUDES_WITH_SYSTEM)
set(warning_guard SYSTEM)
endif()
endif()

58
conanfile.py Normal file
View File

@ -0,0 +1,58 @@
from conans import ConanFile
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps
class LnavConan(ConanFile):
name = "lnav"
version = "0.11.1"
homepage = "https://lnav.org"
url = "https://github.com/tstack/lnav.git"
license = "BSD-2-Clause"
description = (
"The Log File Navigator, lnav for short, is an advanced "
"log file viewer for the small-scale"
)
settings = "os", "compiler", "build_type", "arch"
exports_sources = "*"
no_copy_source = True
requires = (
"bzip2/1.0.8",
"libarchive/3.6.0",
"libcurl/7.85.0",
"ncurses/6.3",
"pcre2/10.40",
"readline/8.1.2",
"sqlite3/3.38.0",
"zlib/1.2.12",
)
generators = ("virtualrunenv",)
default_options = {
"libarchive:with_bzip2": True,
"libarchive:with_lz4": True,
"libarchive:with_lzo": True,
"libarchive:with_lzma": True,
"libarchive:with_zstd": True,
"pcre2:support_jit": True,
"pcre2:build_pcre2_8": True,
"sqlite3:enable_json1": True,
"sqlite3:enable_soundex": True,
"readline:with_library": "curses",
}
def generate(self):
CMakeToolchain(self).generate()
CMakeDeps(self).generate()
def build(self):
cmake = CMake(self)
cmake.configure()
if self.settings.os == "Macos" and self.settings.arch == "armv8":
cmake.definitions["CMAKE_SYSTEM_PROCESSOR"] = "arm64"
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
def deploy(self):
self.copy("*", dst="bin", src="bin")

View File

@ -1,4 +1,4 @@
AC_INIT([lnav],[0.10.1],[lnav@googlegroups.com],[lnav],[http://lnav.org])
AC_INIT([lnav],[0.11.1],[lnav@googlegroups.com],[lnav],[http://lnav.org])
AC_CONFIG_SRCDIR([src/lnav.cc])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign subdir-objects])
@ -52,7 +52,7 @@ dnl you are building it)
AS_CASE([x$srcdir],
[x/*],
AS_VAR_SET(abssrcdir, $srcdir),
AS_VAR_SET(abssrcdir, `pwd`/$srcdir)
AS_VAR_SET(abssrcdir, `cd $srcdir; pwd`)
)
AC_SUBST(abssrcdir)
@ -83,6 +83,7 @@ AC_PATH_PROG(BZIP2_CMD, [bzip2])
AC_PATH_PROG(RE2C_CMD, [re2c])
AM_CONDITIONAL(HAVE_RE2C, test x"$RE2C_CMD" != x"")
AC_PATH_PROG(XZ_CMD, [xz])
AC_PATH_PROG(TSHARK_CMD, [tshark])
AC_CHECK_SIZEOF(off_t)
AC_CHECK_SIZEOF(size_t)
@ -101,7 +102,7 @@ AC_SEARCH_LIBS(BZ2_bzopen, bz2,
AC_SUBST(BZIP2_SUPPORT)
AC_SEARCH_LIBS(dlopen, dl)
AC_SEARCH_LIBS(backtrace, execinfo)
LIBCURL_CHECK_CONFIG([], [7.23.0], [], [])
LIBCURL_CHECK_CONFIG([], [7.23.0], [], [AC_MSG_ERROR([libcurl required to build])], [test x"${enable_static}" = x"yes"])
# Sometimes, curses depends on these libraries being linked in...
AC_ARG_ENABLE([tinfo],
@ -183,7 +184,7 @@ AS_VAR_IF([ax_cv_curses],[yes],[],
)
AX_PATH_LIB_ARCHIVE
AX_PATH_LIB_PCRE([], [AC_MSG_ERROR([pcre required to build])])
AX_CHECK_PCRE2([8], [], [AC_MSG_ERROR([pcre2 is required to build])])
AX_PATH_LIB_READLINE
AX_CODE_COVERAGE
@ -205,7 +206,7 @@ AS_VAR_SET(ALL_LDFLAGS, "$SQLITE3_LDFLAGS $READLINE_LDFLAGS $LIBARCHIVE_LDFLAGS
AS_VAR_SET(static_lib_list,
["libncurses.a libncursesw.a libreadline.a libsqlite3.a libz.a libtinfo.a libtinfow.a"])
AS_VAR_SET(static_lib_list,
["$static_lib_list libpcre.a libncursesw.a libbz2.a"])
["$static_lib_list libpcre2-8.a libncursesw.a libbz2.a"])
AS_VAR_SET(static_lib_list,
["$static_lib_list libgpm.a libcurl.a libcrypto.a libssl.a libssh2.a"])
AS_VAR_SET(static_lib_list,
@ -307,9 +308,13 @@ AM_CONDITIONAL(USE_INCLUDED_YAJL, test $HAVE_LOCAL_YAJL -eq 0)
AM_CONDITIONAL(HAVE_LIBCURL, test x"$LIBCURL" != x"")
AM_CONDITIONAL([DISABLE_DOCUMENTATION], [ test x"$cross_compiling" != x"no" ])
USER_CXXFLAGS="${CXXFLAGS}"
AC_SUBST(USER_CXXFLAGS)
AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([TESTS_ENVIRONMENT])
AC_CONFIG_FILES([tools/Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([src/base/Makefile])
AC_CONFIG_FILES([src/formats/logfmt/Makefile])
@ -317,9 +322,10 @@ AC_CONFIG_FILES([src/fmtlib/Makefile])
AC_CONFIG_FILES([src/pcrepp/Makefile])
AC_CONFIG_FILES([src/pugixml/Makefile])
AC_CONFIG_FILES([src/tailer/Makefile])
AC_CONFIG_FILES([src/tools/Makefile])
AC_CONFIG_FILES([src/yajl/Makefile])
AC_CONFIG_FILES([src/yajlpp/Makefile])
AC_CONFIG_FILES([src/third-party/base64/lib/Makefile])
AC_CONFIG_FILES([src/third-party/scnlib/src/Makefile])
AC_CONFIG_FILES([test/Makefile])
AC_OUTPUT

44
demo/Dockerfile Normal file
View File

@ -0,0 +1,44 @@
FROM debian:11.3-slim
RUN set -eux; \
export DEBIAN_FRONTEND=noninteractive; \
apt update; \
apt install --yes --no-install-recommends bind9-dnsutils iputils-ping iproute2 curl ca-certificates htop wget unzip openssh-server; \
apt clean autoclean; \
apt autoremove --yes; \
rm -rf /var/lib/{apt,dpkg,cache,log}/; \
echo "Installed base utils!"
ADD https://github.com/tstack/lnav/releases/download/v0.11.0/lnav-0.11.0-musl-64bit.zip /
RUN unzip lnav-0.11.0-musl-64bit.zip
COPY docs/tutorials tutorials
RUN gunzip /tutorials/playground/logs/*.gz
RUN useradd -rm -d /home/playground -s /bin/bash playground
RUN echo 'playground:playground' | chpasswd
RUN passwd -d playground
RUN useradd -rm -d /home/tutorial1 -s /bin/bash tutorial1
RUN echo 'tutorial1:tutorial1' | chpasswd
RUN passwd -d tutorial1
USER playground
RUN /lnav-0.11.0/lnav -nN -c ":config /ui/theme monocai"
USER tutorial1
RUN /lnav-0.11.0/lnav -nN -c ":config /ui/theme monocai"
USER root
RUN echo 'Match User playground' >> /etc/ssh/sshd_config
RUN echo 'ForceCommand env PATH=/lnav-0.11.0:$PATH /tutorials/playground/run.sh' >> /etc/ssh/sshd_config
RUN echo 'PermitEmptyPasswords yes' >> /etc/ssh/sshd_config
RUN echo 'Match User tutorial1' >> /etc/ssh/sshd_config
RUN echo 'ForceCommand env PATH=/lnav-0.11.0:$PATH /tutorials/tutorial1/run.sh' >> /etc/ssh/sshd_config
RUN echo 'PermitEmptyPasswords yes' >> /etc/ssh/sshd_config
RUN service ssh start
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

35
demo/fly.toml Normal file
View File

@ -0,0 +1,35 @@
# fly.toml file generated for lnav-demo on 2022-08-22T10:26:28-07:00
app = "lnav-demo"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[env]
[experimental]
allowed_public_ports = []
auto_rollback = true
[[services]]
http_checks = []
internal_port = 22
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
port = 22
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
[build]
image = "lnav-demo"

54
demo/loggen.py Executable file
View File

@ -0,0 +1,54 @@
import datetime
import os
import random
import shutil
import sys
MSGS = [
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
"Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",
"Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
]
GLOG_DATE_FMT = "%Y%m%d %H:%M:%S"
START_TIME = datetime.datetime.fromtimestamp(1490191111)
try:
shutil.rmtree("/tmp/demo")
os.makedirs("/tmp/demo")
except OSError:
pass
PIDS = [
"123",
"123",
"123",
"121",
"124",
"123",
"61456",
"61456",
"61457",
]
LOG_LOCS = [
"demo.cc:123",
"demo.cc:352",
"loader.cc:13",
"loader.cc:552",
"blaster.cc:352",
"blaster.cc:112",
"blaster.cc:6782",
]
CURR_TIME = START_TIME
for _index in range(0, int(sys.argv[1])):
CURR_TIME += datetime.timedelta(seconds=random.randrange(1, 22))
print("I%s.%06d %s %s] %s" % (
CURR_TIME.strftime(GLOG_DATE_FMT),
random.randrange(0, 100000),
random.choice(PIDS),
random.choice(LOG_LOCS),
random.choice(MSGS)))

View File

@ -11,23 +11,23 @@ The following options are available for installing **lnav**:
## Linux
<!-- markdown-link-check-disable-next-line -->
Download a [statically linked 64-bit binary](https://github.com/tstack/lnav/releases/download/v{{site.version}}/lnav-{{site.version}}-musl-64bit.zip).
Download a [statically linked 64-bit binary](https://github.com/tstack/lnav/releases/download/v{{site.version}}/lnav-{{site.version}}-x86_64-linux-musl.zip).
Install from the [Snap Store](https://snapcraft.io/lnav):
```shell
% sudo snap install lnav
```console
$ sudo snap install lnav
```
## MacOS
<!-- markdown-link-check-disable-next-line -->
Download a [statically linked 64-bit binary](https://github.com/tstack/lnav/releases/download/v{{site.version}}/lnav-{{site.version}}-os-x.zip)
Download a [statically linked 64-bit binary](https://github.com/tstack/lnav/releases/download/v{{site.version}}/lnav-{{site.version}}-x86_64-macos.zip)
Install using [Homebrew](https://formulae.brew.sh/formula/lnav):
```shell
% brew install lnav
```console
$ brew install lnav
```
## Source
@ -37,15 +37,22 @@ Download the [source](https://github.com/tstack/lnav/releases/download/v{{site.v
and install any dependencies. The following commands will unpack the source
tar ball, configure the build for your system, build, and then install:
```shell
% tar xvfz lnav-{{site.version}}.tar.gz
% cd lnav-{{site.version}}
% ./configure
% make
% make install
```console
$ tar xvfz lnav-{{site.version}}.tar.gz
$ cd lnav-{{site.version}}
$ ./configure
$ make
$ make install
```
### GitHub
If you would like to contribute to the development of lnav, visit our page on
[GitHub](https://github.com/tstack/lnav).
# VSCode Extension
The [lnav VSCode Extension](https://marketplace.visualstudio.com/items?itemName=lnav.lnav)
can be used to add syntax highlighting to lnav scripts.
![Screenshot of an lnav script](/assets/images/lnav-vscode-extension.png)

View File

@ -126,8 +126,8 @@ flag to specify the commands or queries you want to execute. For example, to get
the top 10 client IP addresses from an apache access log file and write the
results to standard out in CSV format:
```shell
% lnav -n \
```console
$ lnav -n \
-c ';SELECT c_ip, count(*) AS total FROM access_log GROUP BY c_ip ORDER BY total DESC LIMIT 10' \
-c ':write-csv-to -' \
access.log

30
docs/04_tutorials.md Normal file
View File

@ -0,0 +1,30 @@
---
layout: page
title: Tutorials
permalink: /tutorials
---
These tutorials are provided to help you learn how **lnav** works
without having to install anything. They are running on a shared
[fly.io](https://fly.io) instance, so please be kind.
The tutorials are implemented using features in **lnav** and not
built in to the code itself. The tutorial text is
[markdown](https://docs.lnav.org/en/latest/ui.html#markdown),
the logic is written [SQL](https://docs.lnav.org/en/latest/sqlext.html),
and the reactions are triggered through
[events](https://docs.lnav.org/en/latest/events.html).
The source for the tutorials can be found [here](https://github.com/tstack/lnav/tree/master/docs/tutorials).
# Tutorial 1
<div id="playground-box">
<h4>Learn how to navigate an example log file using lnav:</h4>
<code>
<span class="prompt">$</span>
<a href="ssh://tutorial1@demo.lnav.org">ssh tutorial1@demo.lnav.org</a>
</code>
</div>

32
docs/Doxyfile.in Normal file
View File

@ -0,0 +1,32 @@
# Configuration for Doxygen for use with CMake
# Only options that deviate from the default are included
# To create a new Doxyfile containing all available options, call `doxygen -g`
# Get Project name and version from CMake
PROJECT_NAME = "@PROJECT_NAME@"
PROJECT_NUMBER = "@PROJECT_VERSION@"
# Add sources
INPUT = "@PROJECT_SOURCE_DIR@/README.md" "@PROJECT_SOURCE_DIR@/include" "@PROJECT_SOURCE_DIR@/source" "@PROJECT_SOURCE_DIR@/docs/pages"
EXTRACT_ALL = YES
RECURSIVE = YES
OUTPUT_DIRECTORY = "@DOXYGEN_OUTPUT_DIRECTORY@"
# Use the README as a main page
USE_MDFILE_AS_MAINPAGE = "@PROJECT_SOURCE_DIR@/README.md"
# set relative include paths
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = "@PROJECT_SOURCE_DIR@/include" "@PROJECT_SOURCE_DIR@"
STRIP_FROM_INC_PATH =
# We use m.css to generate the html documentation, so we only need XML output
GENERATE_XML = YES
GENERATE_HTML = NO
GENERATE_LATEX = NO
XML_PROGRAMLISTING = NO
CREATE_SUBDIRS = NO
# Include all directories, files and namespaces in the documentation
# Disable to include only explicitly documented objects
M_SHOW_UNDOCUMENTED = YES

View File

@ -7,16 +7,14 @@ source "https://rubygems.org"
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 4.2.0"
# gem "jekyll", "~> 4.2.0"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.12"
gem "jekyll-redirect-from", "~> 0.16.0"
end
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
@ -29,3 +27,5 @@ end
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
gem "webrick", "~> 1.7"

View File

@ -1,84 +1,270 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
activesupport (6.0.5.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
concurrent-ruby (1.1.9)
em-websocket (0.5.2)
commonmarker (0.23.6)
concurrent-ruby (1.1.10)
dnsruby (1.61.9)
simpleidn (~> 0.1)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
http_parser.rb (~> 0)
ethon (0.15.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
ffi (1.15.1)
execjs (2.8.1)
faraday (2.5.2)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.0)
ffi (1.15.5)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (1.8.10)
gemoji (3.0.1)
github-pages (227)
github-pages-health-check (= 1.17.9)
jekyll (= 3.9.2)
jekyll-avatar (= 0.7.0)
jekyll-coffeescript (= 1.1.1)
jekyll-commonmark-ghpages (= 0.2.0)
jekyll-default-layout (= 0.1.4)
jekyll-feed (= 0.15.1)
jekyll-gist (= 1.5.0)
jekyll-github-metadata (= 2.13.0)
jekyll-include-cache (= 0.2.1)
jekyll-mentions (= 1.6.0)
jekyll-optional-front-matter (= 0.3.2)
jekyll-paginate (= 1.1.0)
jekyll-readme-index (= 0.3.0)
jekyll-redirect-from (= 0.16.0)
jekyll-relative-links (= 0.6.1)
jekyll-remote-theme (= 0.4.3)
jekyll-sass-converter (= 1.5.2)
jekyll-seo-tag (= 2.8.0)
jekyll-sitemap (= 1.4.0)
jekyll-swiss (= 1.0.0)
jekyll-theme-architect (= 0.2.0)
jekyll-theme-cayman (= 0.2.0)
jekyll-theme-dinky (= 0.2.0)
jekyll-theme-hacker (= 0.2.0)
jekyll-theme-leap-day (= 0.2.0)
jekyll-theme-merlot (= 0.2.0)
jekyll-theme-midnight (= 0.2.0)
jekyll-theme-minimal (= 0.2.0)
jekyll-theme-modernist (= 0.2.0)
jekyll-theme-primer (= 0.6.0)
jekyll-theme-slate (= 0.2.0)
jekyll-theme-tactile (= 0.2.0)
jekyll-theme-time-machine (= 0.2.0)
jekyll-titles-from-headings (= 0.5.3)
jemoji (= 0.12.0)
kramdown (= 2.3.2)
kramdown-parser-gfm (= 1.1.0)
liquid (= 4.0.3)
mercenary (~> 0.3)
minima (= 2.5.1)
nokogiri (>= 1.13.6, < 2.0)
rouge (= 3.26.0)
terminal-table (~> 1.4)
github-pages-health-check (1.17.9)
addressable (~> 2.3)
dnsruby (~> 1.60)
octokit (~> 4.0)
public_suffix (>= 3.0, < 5.0)
typhoeus (~> 1.3)
html-pipeline (2.14.2)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.8.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (4.2.0)
jekyll (3.9.2)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
kramdown (>= 1.17, < 3)
liquid (~> 4.0)
mercenary (~> 0.4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 3.0)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
terminal-table (~> 2.0)
jekyll-avatar (0.7.0)
jekyll (>= 3.0, < 5.0)
jekyll-coffeescript (1.1.1)
coffee-script (~> 2.2)
coffee-script-source (~> 1.11.1)
jekyll-commonmark (1.4.0)
commonmarker (~> 0.22)
jekyll-commonmark-ghpages (0.2.0)
commonmarker (~> 0.23.4)
jekyll (~> 3.9.0)
jekyll-commonmark (~> 1.4.0)
rouge (>= 2.0, < 4.0)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.15.1)
jekyll (>= 3.7, < 5.0)
jekyll-gist (1.5.0)
octokit (~> 4.2)
jekyll-github-metadata (2.13.0)
jekyll (>= 3.4, < 5.0)
octokit (~> 4.0, != 4.4.0)
jekyll-include-cache (0.2.1)
jekyll (>= 3.7, < 5.0)
jekyll-mentions (1.6.0)
html-pipeline (~> 2.3)
jekyll (>= 3.7, < 5.0)
jekyll-optional-front-matter (0.3.2)
jekyll (>= 3.0, < 5.0)
jekyll-paginate (1.1.0)
jekyll-readme-index (0.3.0)
jekyll (>= 3.0, < 5.0)
jekyll-redirect-from (0.16.0)
jekyll (>= 3.3, < 5.0)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.7.1)
jekyll-relative-links (0.6.1)
jekyll (>= 3.3, < 5.0)
jekyll-remote-theme (0.4.3)
addressable (~> 2.0)
jekyll (>= 3.5, < 5.0)
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
rubyzip (>= 1.3.0, < 3.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-swiss (1.0.0)
jekyll-theme-architect (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-cayman (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-dinky (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-hacker (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-leap-day (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-merlot (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-midnight (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-minimal (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-modernist (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-primer (0.6.0)
jekyll (> 3.5, < 5.0)
jekyll-github-metadata (~> 2.9)
jekyll-seo-tag (~> 2.0)
jekyll-theme-slate (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-tactile (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-time-machine (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-titles-from-headings (0.5.3)
jekyll (>= 3.3, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.3.1)
jemoji (0.12.0)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
kramdown (2.3.2)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.5.1)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
mercenary (0.3.6)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.16.3)
nokogiri (1.13.9-arm64-darwin)
racc (~> 1.4)
nokogiri (1.13.9-x86_64-linux)
racc (~> 1.4)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
rb-fsevent (0.11.0)
public_suffix (4.0.7)
racc (1.6.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.26.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (2.0.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
simpleidn (0.2.1)
unf (~> 0.1.4)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.7.0)
thread_safe (0.3.6)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.10)
thread_safe (~> 0.1)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
webrick (1.7.0)
zeitwerk (2.6.0)
PLATFORMS
universal-darwin-20
arm64-darwin-21
x86_64-linux
DEPENDENCIES
jekyll (~> 4.2.0)
jekyll-feed (~> 0.12)
jekyll-redirect-from (~> 0.16.0)
github-pages
minima (~> 2.5)
tzinfo (~> 1.2)
tzinfo-data
wdm (~> 0.1.1)
webrick (~> 1.7)
BUNDLED WITH
2.2.20
2.3.20

View File

@ -1,4 +1,4 @@
# Docs
This directory contains the ReST documentation that is published to
[lnav.readthedocs.io](https://lnav.readthedocs.io)
[docs.lnav.org](https://docs.lnav.org)

View File

@ -19,7 +19,7 @@
# in the templates via {{ site.myvariable }}.
title: The Logfile Navigator
version: 0.10.0
version: 0.11.1
email: support@lnav.org
description: >- # this means to ignore newlines until "baseurl:"
The Logfile Navigator, lnav for short, is an advanced log file viewer
@ -39,6 +39,7 @@ show_excerpts: true
exclude:
- source
- tutorials
# Exclude from processing.
# The following items will not be processed, by default.

View File

@ -1,15 +1,121 @@
<ul class="social-media-list">
{%- if site.dribbble_username -%}<li><a href="https://dribbble.com/{{ site.dribbble_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#dribbble' | relative_url }}"></use></svg> <span class="username">{{ site.dribbble_username| escape }}</span></a></li>{%- endif -%}
{%- if site.facebook_username -%}<li><a href="https://www.facebook.com/{{ site.facebook_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#facebook' | relative_url }}"></use></svg> <span class="username">{{ site.facebook_username| escape }}</span></a></li>{%- endif -%}
{%- if site.flickr_username -%}<li><a href="https://www.flickr.com/photos/{{ site.flickr_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#flickr' | relative_url }}"></use></svg> <span class="username">{{ site.flickr_username| escape }}</span></a></li>{%- endif -%}
{%- if site.github_username -%}<li><a href="https://github.com/{{ site.github_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#github' | relative_url }}"></use></svg> <span class="username">{{ site.github_username| escape }}</span></a></li>{%- endif -%}
{%- if site.github -%}<li><a href="https://github.com/{{ site.github }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#github' | relative_url }}"></use></svg> <span class="username">{{ site.github | escape }}</span></a></li>{%- endif -%}
{%- if site.instagram_username -%}<li><a href="https://instagram.com/{{ site.instagram_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#instagram' | relative_url }}"></use></svg> <span class="username">{{ site.instagram_username| escape }}</span></a></li>{%- endif -%}
{%- if site.linkedin_username -%}<li><a href="https://www.linkedin.com/in/{{ site.linkedin_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#linkedin' | relative_url }}"></use></svg> <span class="username">{{ site.linkedin_username| escape }}</span></a></li>{%- endif -%}
{%- if site.pinterest_username -%}<li><a href="https://www.pinterest.com/{{ site.pinterest_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#pinterest' | relative_url }}"></use></svg> <span class="username">{{ site.pinterest_username| escape }}</span></a></li>{%- endif -%}
{%- for mst in site.mastodon -%}{%- if mst.username and mst.instance -%}<li><a href="https://{{ mst.instance| cgi_escape | escape}}/@{{mst.username}}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#mastodon' | relative_url }}"></use></svg> <span class="username">{{ mst.username|escape }}</span></a></li>{%- endif -%}{%- endfor -%}
{%- if site.twitter_username -%}<li><a href="https://www.twitter.com/{{ site.twitter_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#twitter' | relative_url }}"></use></svg> <span class="username">{{ site.twitter_username| escape }}</span></a></li>{%- endif -%}
{%- if site.youtube_username -%}<li><a href="https://youtube.com/{{ site.youtube_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#youtube' | relative_url }}"></use></svg> <span class="username">{{ site.youtube_username| escape }}</span></a></li>{%- endif -%}
{%- if site.googleplus_username -%}<li><a href="https://plus.google.com/{{ site.googleplus_username| escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#googleplus' | relative_url }}"></use></svg> <span class="username">{{ site.googleplus_username| escape }}</span></a></li>{%- endif -%}
{%- if site.rss -%}<li><a href="{{ 'feed.xml' | relative_url }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#rss' | relative_url }}"></use></svg> <span>{{ site.rss | escape }}</span></a></li>{%- endif -%}
{%- if site.dribbble_username -%}
<li>
<a href="https://dribbble.com/{{ site.dribbble_username| cgi_escape | escape }}">
<svg class="svg-icon">
<use xlink:href="{{ '/assets/minima-social-icons.svg#dribbble' | relative_url }}"></use>
</svg>
<span class="username">{{ site.dribbble_username| escape }}</span></a>
</li>
{%- endif -%}
{%- if site.facebook_username -%}
<li>
<a href="https://www.facebook.com/{{ site.facebook_username| cgi_escape | escape }}">
<svg class="svg-icon">
<use xlink:href="{{ '/assets/minima-social-icons.svg#facebook' | relative_url }}"></use>
</svg>
<span class="username">{{ site.facebook_username| escape }}</span></a>
</li>
{%- endif -%}
{%- if site.flickr_username -%}
<li>
<a href="https://www.flickr.com/photos/{{ site.flickr_username| cgi_escape | escape }}">
<svg class="svg-icon">
<use xlink:href="{{ '/assets/minima-social-icons.svg#flickr' | relative_url }}"></use>
</svg>
<span class="username">{{ site.flickr_username| escape }}</span></a>
</li>
{%- endif -%}
{%- if site.github_username -%}
<li>
<a href="https://github.com/{{ site.github_username| cgi_escape | escape }}">
<svg class="svg-icon">
<use xlink:href="{{ '/assets/minima-social-icons.svg#github' | relative_url }}"></use>
</svg>
<span class="username">{{ site.github_username| escape }}</span></a>
</li>
{%- endif -%}
{%- if site.github -%}
<li><a href="https://github.com/{{ site.github }}">
<svg class="svg-icon">
<use xlink:href="{{ '/assets/minima-social-icons.svg#github' | relative_url }}"></use>
</svg>
<span class="username">{{ site.github | escape }}</span></a></li>
{%- endif -%}
{%- if site.instagram_username -%}
<li>
<a href="https://instagram.com/{{ site.instagram_username| cgi_escape | escape }}">
<svg class="svg-icon">
<use xlink:href="{{ '/assets/minima-social-icons.svg#instagram' | relative_url }}"></use>
</svg>
<span class="username">{{ site.instagram_username| escape }}</span></a>
</li>
{%- endif -%}
{%- if site.linkedin_username -%}
<li>
<a href="https://www.linkedin.com/in/{{ site.linkedin_username| cgi_escape | escape }}">
<svg class="svg-icon">
<use xlink:href="{{ '/assets/minima-social-icons.svg#linkedin' | relative_url }}"></use>
</svg>
<span class="username">{{ site.linkedin_username| escape }}</span></a>
</li>
{%- endif -%}
{%- if site.pinterest_username -%}
<li>
<a href="https://www.pinterest.com/{{ site.pinterest_username| cgi_escape | escape }}">
<svg class="svg-icon">
<use xlink:href="{{ '/assets/minima-social-icons.svg#pinterest' | relative_url }}"></use>
</svg>
<span class="username">{{ site.pinterest_username| escape }}</span></a>
</li>
{%- endif -%}
{%- for mst in site.mastodon -%}{%- if mst.username and mst.instance -%}
<li>
<a href="https://{{ mst.instance| cgi_escape | escape}}/@{{mst.username}}">
<svg class="svg-icon">
<use xlink:href="{{ '/assets/minima-social-icons.svg#mastodon' | relative_url }}"></use>
</svg>
<span class="username">{{ mst.username|escape }}</span></a></li>
{%- endif -%}{%- endfor -%}
{%- if site.twitter_username -%}
<li>
<a href="https://www.twitter.com/{{ site.twitter_username| cgi_escape | escape }}">
<svg class="svg-icon">
<use xlink:href="{{ '/assets/minima-social-icons.svg#twitter' | relative_url }}"></use>
</svg>
<span class="username">{{ site.twitter_username| escape }}</span></a>
</li>
{%- endif -%}
{%- if site.youtube_username -%}
<li>
<a href="https://youtube.com/{{ site.youtube_username| cgi_escape | escape }}">
<svg class="svg-icon">
<use xlink:href="{{ '/assets/minima-social-icons.svg#youtube' | relative_url }}"></use>
</svg>
<span class="username">{{ site.youtube_username| escape }}</span></a>
</li>
{%- endif -%}
{%- if site.googleplus_username -%}
<li>
<a href="https://plus.google.com/{{ site.googleplus_username| escape }}">
<svg class="svg-icon">
<use xlink:href="{{ '/assets/minima-social-icons.svg#googleplus' | relative_url }}"></use>
</svg>
<span class="username">{{ site.googleplus_username| escape }}</span></a>
</li>
{%- endif -%}
{%- if site.rss -%}
<li><a href="{{ 'feed.xml' | relative_url }}">
<svg class="svg-icon">
<use xlink:href="{{ '/assets/minima-social-icons.svg#rss' | relative_url }}"></use>
</svg>
<span>{{ site.rss | escape }}</span></a></li>
{%- endif -%}
<li><a href="https://discord.gg/erBPnKwz7R">
<img style="height: 1.75em"
src="https://assets-global.website-files.com/6257adef93867e50d84d30e2/62594fdd4b264a31eafa1e5d_92ad040ed5143bfb541ea61f5c3bb18f.svg"/>
</a></li>
</ul>
<script data-goatcounter="https://lnav.goatcounter.com/count"
async src="//gc.zgo.at/count.js"></script>

View File

@ -21,7 +21,6 @@
font-size: x-large;
font-weight: lighter;
margin-top: 2em;
margin-bottom: 4em;
margin-left: 2em;
}

View File

@ -0,0 +1,73 @@
---
layout: post
title: Integration with regex101.com
excerpt: Create/edit format files using regex101.com
---
*(This change will be in the upcoming v0.11.0 release)*
Creating and updating format files for **lnav** can be a bit tedious and
error-prone. To help streamline the process, an integration with regex101.com
has been added. Now, you can create regular expressions for plaintext log
files on https://regex101.com and then create a skeleton format file with a
simple command. If you already have a format file that needs to be updated,
you can push the regexes up to regex101, edit them with their interface, and
then pull the changes back down as a format patch file.
To further improve the experience of developing with format files, there is
also work underway to improve error messages. Many messages should be clearer,
more context is provided, and they should look nicer as well. For example, the
following error is displayed when a format regex is not valid:
![Screenshot of an error message](/assets/images/lnav-invalid-regex-error.png)
## Management CLI
The regex101 integration can be accessed through the new "management-mode CLI".
This mode can be accessed by passing `-m` as the first option to **lnav**. The
management CLI is organized as a series of nested commands. If you're not sure
what to do at a given level, run the command as-is and the CLI should print out
help text to guide you through the hierarchy of commands and required
parameters.
### Create a format from a regular expression
The `regex101 import` command can be used to import a regular expression from
regex101.com and create or patch a format file. The command takes the URL of
the regex, the format name, and the name of the regex in the log format (
defaults to "std" if not given). For example, the following command can be used
to import the regex at "https://regex101.com/r/zpEnjV/2" into the format named "
re101_example_log":
```console
$ lnav -m regex101 import https://regex101.com/r/zpEnjV/2 re101_example_log
```
If the import was successful, the path to the skeleton format file will be
printed. You will most likely need to edit the file to fill in more details
about your log format.
### Editing an existing regular expression
If you have a log format with a regex that needs to be updated, you can push
the regex to regex101.com for editing with a command like (replace
"myformat_log"/"std" with the name of your format and regex):
```console
$ lnav -m format myformat_log regex std regex101 push
```
Along with the regex, the format's samples will be added to the entry to ensure
changes won't break existing matches. If the push was successful, the URL for
the new regex101.com entry will be printed out. You can use that URL to edit the
regex to your needs. Once you're done editing the regex, you can pull the
changes down to a "patch" file using the following command:
```console
$ lnav -m format myformat_log regex std regex101 pull
```
The patch file will be evaluated after the original format file and override
the values from the original. Once you are satisfied with the changes, you
can move the contents of the patch file to the original file and delete the
patch.

View File

@ -0,0 +1,46 @@
---
layout: post
title: Pretty error messages
excerpt: Error message improvements
---
*(This change will be in the upcoming v0.11.0 release)*
Taking a page from compilers like rustc, I've spent some time
improving error messages to make them look nicer and be more
helpful. Fortunately, SQLite has improved their error reporting
as well by adding
[sqlite3_error_offset()](http://sqlite.com/c3ref/errcode.html).
This function can point to the part of the SQL statement that
was in error. As an example of the improvement, a SQL file
that contained the following content:
```sql
-- This is a test
SELECT abc),
rtrim(def)
FROM mytable;
```
Would report an error like the following on startup in v0.10.1:
```text
error:/Users/tstack/.config/lnav/formats/installed/test.sql:2:near ")": syntax error
```
Now, you will get a clearer error message with a syntax-highlighted
code snippet and a pointer to the part of the code that has the
problem:
![Screenshot of a SQL error](/assets/images/lnav-sql-error-msg.png)
Inside the TUI, a panel has been added at the bottom to display these
long-form error messages. The panel will disappear after a short
time or when input is received. Here is an example showing an error
for an invalid regular expression:
<script id="asciicast-lmYMLZsB02WbSO8VEz4aVLXa1"
src="https://asciinema.org/a/lmYMLZsB02WbSO8VEz4aVLXa1.js"
async>
</script>

View File

@ -0,0 +1,33 @@
---
layout: post
title: Markdown Support
excerpt: A side effect of fancier help text
---
*(This change will be in the upcoming v0.11.0 release)*
As part of the effort to polish the lnav TUI, I wanted to make the builtin
help text look a bit nicer. The current help text is a plain text file with
some ANSI escape sequences for colors. It's not easy to write or read. Since
Markdown has become a dominant way to write this type of document, I figured
I could use that and have the side benefit of allowing lnav to read Markdown
docs. Fortunately, the [MD4C](https://github.com/mity/md4c) library exists.
This library provides a nice event-driven parser for documents instead of
just converting directly to HTML. In addition, document structure is now
shown/navigable through the new breadcrumb bar at the top. I think the
result is pretty nice:
<script id="asciicast-2hx3UiyzOHQXBQOBf31ztKvHc"
src="https://asciinema.org/a/2hx3UiyzOHQXBQOBf31ztKvHc.js"
async>
</script>
## Viewing Markdown Files
Files with an `.md` suffix will be considered as Markdown and will be
parsed as such. As an example, here is lnav displaying its README.md file:
<script id="asciicast-iw4rwddZNGCe3v8DyOfItERG9"
src="https://asciinema.org/a/iw4rwddZNGCe3v8DyOfItERG9.js"
async>
</script>

View File

@ -0,0 +1,27 @@
---
layout: post
title: Playground and Tutorial
excerpt: Try lnav without having to install anything
---
To make it easier to try out **lnav**, I've deployed an ssh-based playground
and tutorial. You can SSH as follows to try them out:
```console
$ ssh playground@demo.lnav.org
$ ssh tutorial1@demo.lnav.org
```
<script id="asciicast-HiiUMMmRKZh0uCVKm1Uw8WLlw"
src="https://asciinema.org/a/HiiUMMmRKZh0uCVKm1Uw8WLlw.js"
async>
</script>
The playground has a couple of example logs to play with. The tutorial
tries to guide you through the basics of navigating log files with lnav.
The server is running on the free-tier of [fly.io](https://fly.io), so
please be kind.
This effort was inspired by the `git.charm.sh` SSH server and by the
[fasterthanli.me](https://fasterthanli.me/articles/remote-development-with-rust-on-fly-io)
post on doing remote development on fly.io.

View File

@ -0,0 +1,21 @@
---
layout: post
title: VSCode Extension for lnav
excerpt: Syntax highlighting for lnav scripts
---
I've published a simple [Visual Studio Code extension for lnav](
https://marketplace.visualstudio.com/items?itemName=lnav.lnav)
that adds syntax highlighting for scripts. The following is a
screenshot showing the `dhclient-summary.lnav` script that is
builtin:
![Screenshot of an lnav script](/assets/images/lnav-vscode-extension.png)
The lnav commands, those prefixed with colons, are marked as
keywords and the SQL blocks are treated as an embedded language
and highlighted accordingly.
If people find this useful, we can take it further and add
support for running the current script/snippet in a new lnav
process or even talking to an existing one.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 KiB

31
docs/assets/main.scss Normal file
View File

@ -0,0 +1,31 @@
---
---
@import "{{ site.theme }}";
#playground-box {
font-size: x-large;
border-radius: 25px;
background: #8d8;
padding: 20px;
display: inline-block;
}
#playground-box h4 {
margin-bottom: 0;
}
#playground-box code {
padding-left: 20px;
background: #444;
border-color: #444;
}
#playground-box code a {
padding-right: 20px;
color: white;
}
#playground-box .prompt {
color: #4f4;
}

6
docs/conf.py.in Normal file
View File

@ -0,0 +1,6 @@
DOXYFILE = 'Doxyfile'
LINKS_NAVBAR1 = [
(None, 'pages', [(None, 'about')]),
(None, 'namespaces', []),
]

View File

@ -1,11 +1,14 @@
---
# Feel free to add content and custom Front Matter to this file.
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: top
---
![Screenshot of lnav](/assets/images/lnav-front-page.png){: style="float: right"}
![Screenshot of lnav](/assets/images/lnav-front-page.png){:
style="float: right; max-width: 50%"}
<div id="top-description">
An advanced log file viewer for the small-scale
@ -15,6 +18,15 @@ An advanced log file viewer for the small-scale
<p>Watch and analyze your log files from a terminal.</p>
<p>No server. No setup. Still featureful.</p>
<div id="playground-box">
<h4>Try it out:</h4>
<code>
<span class="prompt">$</span>
<a href="ssh://playground@demo.lnav.org">ssh playground@demo.lnav.org</a>
</code>
</div>
</div>
<div class="dlrow">

7
docs/pages/about.dox Normal file
View File

@ -0,0 +1,7 @@
/**
* @page about About
* @section about-doxygen Doxygen documentation
* This page is auto generated using
* <a href="https://www.doxygen.nl/">Doxygen</a>, making use of some useful
* <a href="https://www.doxygen.nl/manual/commands.html">special commands</a>.
*/

View File

@ -1,4 +1,5 @@
Sphinx>=3.4.3
sphinx>=4.3.0
sphinx-jsonschema
sphinx-prompt
pathlib
sphinx-rtd-theme>=0.5.1

View File

@ -1,11 +1,15 @@
{
"$id": "https://lnav.org/schemas/config-v1.schema.json",
"title": "https://lnav.org/schemas/config-v1.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"$schema": {
"title": "/$schema",
"description": "Specifies the type of this file",
"type": "string"
"description": "The URI that specifies the schema that describes this type of file",
"type": "string",
"examples": [
"https://lnav.org/schemas/config-v1.schema.json"
]
},
"tuning": {
"description": "Internal settings",
@ -265,6 +269,11 @@
"title": "/ui/theme-defs/<theme_name>/styles/ok",
"$ref": "#/definitions/style"
},
"info": {
"description": "Styling for informational messages",
"title": "/ui/theme-defs/<theme_name>/styles/info",
"$ref": "#/definitions/style"
},
"warning": {
"description": "Styling for warning messages",
"title": "/ui/theme-defs/<theme_name>/styles/warning",
@ -314,6 +323,91 @@
"description": "Styling for scrollbars",
"title": "/ui/theme-defs/<theme_name>/styles/scrollbar",
"$ref": "#/definitions/style"
},
"h1": {
"description": "Styling for top-level headers",
"title": "/ui/theme-defs/<theme_name>/styles/h1",
"$ref": "#/definitions/style"
},
"h2": {
"description": "Styling for 2nd-level headers",
"title": "/ui/theme-defs/<theme_name>/styles/h2",
"$ref": "#/definitions/style"
},
"h3": {
"description": "Styling for 3rd-level headers",
"title": "/ui/theme-defs/<theme_name>/styles/h3",
"$ref": "#/definitions/style"
},
"h4": {
"description": "Styling for 4th-level headers",
"title": "/ui/theme-defs/<theme_name>/styles/h4",
"$ref": "#/definitions/style"
},
"h5": {
"description": "Styling for 5th-level headers",
"title": "/ui/theme-defs/<theme_name>/styles/h5",
"$ref": "#/definitions/style"
},
"h6": {
"description": "Styling for 6th-level headers",
"title": "/ui/theme-defs/<theme_name>/styles/h6",
"$ref": "#/definitions/style"
},
"hr": {
"description": "Styling for horizontal rules",
"title": "/ui/theme-defs/<theme_name>/styles/hr",
"$ref": "#/definitions/style"
},
"hyperlink": {
"description": "Styling for hyperlinks",
"title": "/ui/theme-defs/<theme_name>/styles/hyperlink",
"$ref": "#/definitions/style"
},
"list-glyph": {
"description": "Styling for glyphs that prefix a list item",
"title": "/ui/theme-defs/<theme_name>/styles/list-glyph",
"$ref": "#/definitions/style"
},
"breadcrumb": {
"description": "Styling for the separator between breadcrumbs",
"title": "/ui/theme-defs/<theme_name>/styles/breadcrumb",
"$ref": "#/definitions/style"
},
"table-border": {
"description": "Styling for table borders",
"title": "/ui/theme-defs/<theme_name>/styles/table-border",
"$ref": "#/definitions/style"
},
"table-header": {
"description": "Styling for table headers",
"title": "/ui/theme-defs/<theme_name>/styles/table-header",
"$ref": "#/definitions/style"
},
"quote-border": {
"description": "Styling for quoted-block borders",
"title": "/ui/theme-defs/<theme_name>/styles/quote-border",
"$ref": "#/definitions/style"
},
"quoted-text": {
"description": "Styling for quoted text blocks",
"title": "/ui/theme-defs/<theme_name>/styles/quoted-text",
"$ref": "#/definitions/style"
},
"footnote-border": {
"description": "Styling for footnote borders",
"title": "/ui/theme-defs/<theme_name>/styles/footnote-border",
"$ref": "#/definitions/style"
},
"footnote-text": {
"description": "Styling for footnote text",
"title": "/ui/theme-defs/<theme_name>/styles/footnote-text",
"$ref": "#/definitions/style"
},
"snippet-border": {
"description": "Styling for snippet borders",
"title": "/ui/theme-defs/<theme_name>/styles/snippet-border",
"$ref": "#/definitions/style"
}
},
"additionalProperties": false
@ -323,6 +417,16 @@
"title": "/ui/theme-defs/<theme_name>/syntax-styles",
"type": "object",
"properties": {
"quoted-code": {
"description": "Styling for quoted code blocks",
"title": "/ui/theme-defs/<theme_name>/syntax-styles/quoted-code",
"$ref": "#/definitions/style"
},
"code-border": {
"description": "Styling for quoted-code borders",
"title": "/ui/theme-defs/<theme_name>/syntax-styles/code-border",
"$ref": "#/definitions/style"
},
"keyword": {
"description": "Styling for keywords in source files",
"title": "/ui/theme-defs/<theme_name>/syntax-styles/keyword",
@ -383,6 +487,21 @@
"title": "/ui/theme-defs/<theme_name>/syntax-styles/diff-section",
"$ref": "#/definitions/style"
},
"spectrogram-low": {
"description": "Styling for the lower threshold values in the spectrogram view",
"title": "/ui/theme-defs/<theme_name>/syntax-styles/spectrogram-low",
"$ref": "#/definitions/style"
},
"spectrogram-medium": {
"description": "Styling for the medium threshold values in the spectrogram view",
"title": "/ui/theme-defs/<theme_name>/syntax-styles/spectrogram-medium",
"$ref": "#/definitions/style"
},
"spectrogram-high": {
"description": "Styling for the high threshold values in the spectrogram view",
"title": "/ui/theme-defs/<theme_name>/syntax-styles/spectrogram-high",
"$ref": "#/definitions/style"
},
"file": {
"description": "Styling for file names in source files",
"title": "/ui/theme-defs/<theme_name>/syntax-styles/file",
@ -446,6 +565,11 @@
"title": "/ui/theme-defs/<theme_name>/status-styles/subtitle",
"$ref": "#/definitions/style"
},
"info": {
"description": "Styling for informational messages in status bars",
"title": "/ui/theme-defs/<theme_name>/status-styles/info",
"$ref": "#/definitions/style"
},
"hotkey": {
"description": "Styling for hotkey highlights of status bars",
"title": "/ui/theme-defs/<theme_name>/status-styles/hotkey",
@ -471,7 +595,7 @@
"title": "/ui/theme-defs/<theme_name>/highlights",
"type": "object",
"patternProperties": {
"(\\w+)": {
"([\\w\\-]+)": {
"title": "/ui/theme-defs/<theme_name>/highlights/<highlight_name>",
"type": "object",
"properties": {
@ -516,7 +640,7 @@
"title": "/ui/keymap-defs/<keymap_name>/<key_seq>/command",
"description": "The command to execute for the given key sequence. Use a script to execute more complicated operations.",
"type": "string",
"pattern": "[:|;].*",
"pattern": "^[:|;].*",
"examples": [
":goto next hour"
]
@ -538,6 +662,40 @@
},
"additionalProperties": false
},
"log": {
"description": "Log message settings",
"title": "/log",
"type": "object",
"properties": {
"watch-expressions": {
"description": "Log message watch expressions",
"title": "/log/watch-expressions",
"type": "object",
"patternProperties": {
"([\\w\\-]+)": {
"description": "A log message watch expression",
"title": "/log/watch-expressions/<watch_name>",
"type": "object",
"properties": {
"expr": {
"title": "/log/watch-expressions/<watch_name>/expr",
"description": "The SQL expression to execute for each input line. If expression evaluates to true, a 'log message detected' event will be published.",
"type": "string"
},
"enabled": {
"title": "/log/watch-expressions/<watch_name>/enabled",
"description": "Indicates whether or not this expression should be evaluated during log processing.",
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"global": {
"description": "Global variable definitions",
"title": "/global",

View File

@ -0,0 +1,26 @@
{
"$id": "https://lnav.org/event-file-format-detected-v1.schema.json",
"title": "https://lnav.org/event-file-format-detected-v1.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Event fired when a log format is detected for a file.",
"properties": {
"$schema": {
"title": "/$schema",
"type": "string",
"examples": [
"https://lnav.org/event-file-format-detected-v1.schema.json"
]
},
"filename": {
"title": "/filename",
"description": "The path of the file for which a matching format was found",
"type": "string"
},
"format": {
"title": "/format",
"description": "The name of the format",
"type": "string"
}
},
"additionalProperties": false
}

View File

@ -0,0 +1,21 @@
{
"$id": "https://lnav.org/event-file-open-v1.schema.json",
"title": "https://lnav.org/event-file-open-v1.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Event fired when a file is opened.",
"properties": {
"$schema": {
"title": "/$schema",
"type": "string",
"examples": [
"https://lnav.org/event-file-open-v1.schema.json"
]
},
"filename": {
"title": "/filename",
"description": "The path of the file that was opened",
"type": "string"
}
},
"additionalProperties": false
}

View File

@ -0,0 +1,57 @@
{
"$id": "https://lnav.org/event-log-msg-detected-v1.schema.json",
"title": "https://lnav.org/event-log-msg-detected-v1.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Event fired when a log message is detected by a watch expression.",
"properties": {
"$schema": {
"title": "/$schema",
"type": "string",
"examples": [
"https://lnav.org/event-log-msg-detected-v1.schema.json"
]
},
"watch-name": {
"title": "/watch-name",
"description": "The name of the watch expression that matched this log message",
"type": "string"
},
"filename": {
"title": "/filename",
"description": "The path of the file containing the log message",
"type": "string"
},
"line-number": {
"title": "/line-number",
"description": "The line number in the file, starting from zero",
"type": "integer"
},
"format": {
"title": "/format",
"description": "The name of the log format that matched this log message",
"type": "string"
},
"timestamp": {
"title": "/timestamp",
"description": "The timestamp of the log message",
"type": "string"
},
"values": {
"description": "The log message values captured by the log format",
"title": "/values",
"type": "object",
"patternProperties": {
"([\\w\\-]+)": {
"title": "/values/<name>",
"type": [
"boolean",
"integer",
"string"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}

View File

@ -0,0 +1,16 @@
{
"$id": "https://lnav.org/event-session-loaded-v1.schema.json",
"title": "https://lnav.org/event-session-loaded-v1.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Event fired when a session is loaded.",
"properties": {
"$schema": {
"title": "/$schema",
"type": "string",
"examples": [
"https://lnav.org/event-session-loaded-v1.schema.json"
]
}
},
"additionalProperties": false
}

View File

@ -1,5 +1,6 @@
{
"$id": "https://lnav.org/schemas/format-v1.schema.json",
"title": "https://lnav.org/schemas/format-v1.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"$schema": {
@ -74,16 +75,52 @@
"description": "A regular expression that restricts this format to log files with a matching name",
"type": "string"
},
"mime-types": {
"title": "/<format_name>/mime-types",
"description": "A list of mime-types this format should be used for",
"type": "array",
"items": {
"type": "string",
"enum": [
"application/vnd.tcpdump.pcap"
]
}
},
"level-field": {
"title": "/<format_name>/level-field",
"description": "The name of the level field in the log message pattern",
"type": "string"
},
"level-pointer": {
"title": "/<format_name>/level-pointer",
"description": "A regular-expression that matches the JSON-pointer of the level property",
"type": "string"
},
"timestamp-field": {
"title": "/<format_name>/timestamp-field",
"description": "The name of the timestamp field in the log message pattern",
"type": "string"
},
"subsecond-field": {
"title": "/<format_name>/subsecond-field",
"description": "The path to the property in a JSON-lines log message that contains the sub-second time value",
"type": "string"
},
"subsecond-units": {
"title": "/<format_name>/subsecond-units",
"description": "The units of the subsecond-field property value",
"type": "string",
"enum": [
"milli",
"micro",
"nano"
]
},
"time-field": {
"title": "/<format_name>/time-field",
"description": "The name of the time field in the log message pattern. This field should only be specified if the timestamp field only contains a date.",
"type": "string"
},
"body-field": {
"title": "/<format_name>/body-field",
"description": "The name of the body field in the log message pattern",
@ -197,9 +234,9 @@
"([^/]+)": {
"title": "/<format_name>/value/<value_name>/unit/scaling-factor/<scale>",
"type": "object",
"patternProperties": {
"properties": {
"op": {
"title": "/<format_name>/value/<value_name>/unit/scaling-factor/<scale>/<>",
"title": "/<format_name>/value/<value_name>/unit/scaling-factor/<scale>/op",
"type": "string",
"enum": [
"identity",
@ -208,7 +245,7 @@
]
},
"value": {
"title": "/<format_name>/value/<value_name>/unit/scaling-factor/<scale>/<>",
"title": "/<format_name>/value/<value_name>/unit/scaling-factor/<scale>/value",
"type": "number"
}
},
@ -246,7 +283,10 @@
"rewriter": {
"title": "/<format_name>/value/<value_name>/rewriter",
"description": "A command that will rewrite this field when pretty-printing",
"type": "string"
"type": "string",
"examples": [
";SELECT :sc_status || ' (' || (SELECT message FROM http_status_codes WHERE status = :sc_status) || ') '"
]
},
"description": {
"title": "/<format_name>/value/<value_name>/description",
@ -259,6 +299,74 @@
},
"additionalProperties": false
},
"tags": {
"description": "The tags to automatically apply to log messages",
"title": "/<format_name>/tags",
"type": "object",
"patternProperties": {
"([\\w:;\\._\\-]+)": {
"description": "The name of the tag to apply",
"title": "/<format_name>/tags/<tag_name>",
"type": "object",
"properties": {
"paths": {
"description": "Restrict tagging to the given paths",
"title": "/<format_name>/tags/<tag_name>/paths",
"type": "array",
"items": {
"type": "object",
"properties": {
"glob": {
"title": "/<format_name>/tags/<tag_name>/paths/glob",
"description": "The glob to match against file paths",
"type": "string",
"examples": [
"*/system.log*"
]
}
},
"additionalProperties": false
}
},
"pattern": {
"title": "/<format_name>/tags/<tag_name>/pattern",
"description": "The regular expression to match against the body of the log message",
"type": "string",
"examples": [
"\\w+ is down"
]
},
"description": {
"title": "/<format_name>/tags/<tag_name>/description",
"description": "A description of this tag",
"type": "string"
},
"level": {
"title": "/<format_name>/tags/<tag_name>/level",
"description": "Constrain hits to log messages with this level",
"type": "string",
"enum": [
"trace",
"debug5",
"debug4",
"debug3",
"debug2",
"debug",
"info",
"stats",
"notice",
"warning",
"error",
"critical",
"fatal"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"action": {
"title": "/<format_name>/action",
"type": "object",
@ -298,6 +406,11 @@
"items": {
"type": "object",
"properties": {
"description": {
"title": "/<format_name>/sample/description",
"description": "A description of this sample.",
"type": "string"
},
"line": {
"title": "/<format_name>/sample/line",
"description": "A sample log line that should match a pattern in this format.",
@ -340,8 +453,7 @@
"field": {
"title": "/<format_name>/line-format/field",
"description": "The name of the field to substitute at this position",
"type": "string",
"minLength": 1
"type": "string"
},
"default-value": {
"title": "/<format_name>/line-format/default-value",
@ -403,20 +515,42 @@
"search-table": {
"description": "Search tables to automatically define for this log format",
"title": "/<format_name>/search-table",
"type": [
"string",
"object"
],
"type": "object",
"patternProperties": {
"\\w+": {
"(\\w+)": {
"description": "The set of search tables to be automatically defined",
"title": "/<format_name>/search-table/<>",
"title": "/<format_name>/search-table/<table_name>",
"type": "object",
"properties": {
"pattern": {
"title": "/<format_name>/search-table/<>/pattern",
"title": "/<format_name>/search-table/<table_name>/pattern",
"description": "The regular expression for this search table.",
"type": "string"
},
"glob": {
"title": "/<format_name>/search-table/<table_name>/glob",
"description": "Glob pattern used to constrain hits to messages that match the given pattern.",
"type": "string"
},
"level": {
"title": "/<format_name>/search-table/<table_name>/level",
"description": "Constrain hits to log messages with this level",
"type": "string",
"enum": [
"trace",
"debug5",
"debug4",
"debug3",
"debug2",
"debug",
"info",
"stats",
"notice",
"warning",
"error",
"critical",
"fatal"
]
}
},
"additionalProperties": false
@ -474,6 +608,12 @@
"json",
"csv"
]
},
"max-unrecognized-lines": {
"title": "/<format_name>/max-unrecognized-lines",
"description": "The maximum number of lines in a file to use when detecting the format",
"type": "integer",
"minimum": 1
}
},
"additionalProperties": false

View File

@ -1,16 +1,24 @@
.. _cli:
Command Line Interface
======================
There are two command-line interfaces provided by **lnav**, one for viewing
files and one for managing **lnav**'s configuration. The file viewing mode is
the default and is all that most people will need. The management mode can
be useful for those that are developing log file formats and is activated by
passing the :option:`-m` option as the first argument.
File Viewing Mode
-----------------
The following options can be used when starting **lnav**. There are not
many flags because the majority of the functionality is accessed using
the :option:`-c` option to execute :ref:`commands<commands>` or
:ref:`SQL queries<sql-ext>`.
Options
-------
^^^^^^^
.. option:: -h
@ -85,6 +93,35 @@ Options
Do not print the log messages after executing all of the commands.
Management Mode (v0.11.0+)
--------------------------
The management CLI mode provides functionality for query **lnav**'s log
format definitions.
Options
^^^^^^^
.. option:: -m
Switch to management mode. This must be the first option passed on the
command-line.
Subcommands
^^^^^^^^^^^
.. option:: regex101 import <regex101-url> <format-name> [<regex-name>]
Convert a regex101.com entry into a skeleton log format file.
.. option:: format <format-name> regex <regex-name> push
Push a log format regular expression to regex101.com .
.. option:: format <format-name> regex <regex-name> pull
Pull changes to a regex that was previously pushed to regex101.com .
Environment Variables
---------------------
@ -98,6 +135,11 @@ Environment Variables
If :envvar:`XDG_CONFIG_HOME` is not set, lnav will use this directory
to store its configuration in a sub-directory named :file:`.lnav`.
.. envvar:: APPDATA
On Windows, lnav will use this directory instead of HOME
to store its configuration in a sub-directory named :file:`.lnav`.
.. envvar:: TZ
The timezone setting is used in some log formats to convert UTC timestamps

View File

@ -1,4 +1,3 @@
.. role:: lnavcmd(code)
:language: lnav
:class: highlight
@ -20,6 +19,7 @@ the screenshot below shows the help for the :code:`:open` command:
.. figure:: open-help.png
:align: center
:figwidth: 50%
Screenshot of the online help for the :code:`:open` command.
@ -35,7 +35,7 @@ first few lines of the file given as its argument:
Screenshot of the preview shown for the :code:`:open` command.
The :lnavcmd:`:filter-out pattern` command is another instance where the preview behavior
can help you craft the correct command-line. This command takes a PCRE regular
can help you craft the correct command-line. This command takes a PCRE2 regular
expression that specifies the log messages that should be filtered out of the
view. The preview for this command will highlight the portion of the log
messages that match the expression in red. Thus, you can be certain that the
@ -46,7 +46,7 @@ preview behavior for the string "launchd":
.. figure:: filter-out-preview.png
:align: center
Screenshot showing the preview for the :code:`:filter-out launchd` command.
Screenshot showing the preview for the :code:`:filter-out` command.
Any errors detected during preview will be shown in the status bar right above
the command prompt. For example, an attempt to open an unknown file will show
@ -76,6 +76,56 @@ an error message in the status bar, like so:
This makes it easier to run **lnav** in restricted environments without the
risk of privilege escalation.
I/O Commands
------------
Anonymization
^^^^^^^^^^^^^
Anonymization is the process of removing identifying information from content
to make it safer for sharing with others. For example, an IP address can
often be used to uniquely identify an entity. Substituting all instances of
a particular IP with the same dummy value would remove the identifying data
without losing statistical accuracy. **lnav** has built-in support for
anonymization through the :code:`--anonymize` flag on the :code:`:write-*`
collection of commands. While the anonymization process should catch most
:IPv4 Addresses: Are replaced with addresses in the :code:`10.0.0.0/8` range.
:IPv6 Addresses: Are replaced with addresses in the :code:`2001:db8::/32` range.
:URL User Names: Are replaced with a random animal name.
:URL Passwords: Are replaced with a hash of the input password.
:URL Hosts: Are replaced with a random name under the example.com domain.
:URL Paths: Are recursively examined for substitution.
:URL Query Strings: Are recursively examined for substitution.
:URL Fragments: Are recursively examined for substitution.
:Paths: Are recursively examined for substitution.
:Credit Card Numbers: Are replaced with a 16 digit hash of the input number.
:MAC Addresses: Are replaced with addresses in the :code:`00:00:5E:00:53:00` range.
:Hex Dumps: Are replaced with a hash of the input replicated to the size of input.
:Email User Names: Are replaced with a random animal name.
:Email Host Names: Are replaced with a random name under the example.com domain.
:Words: Are replaced with a random word with a matching case style.
:Quoted Strings: Are recursively examined for substitution.
:UUID: Are replaced with a hash of the input.
:XML Attribute Values: Are recursively examined for substitution.
Reference
---------

View File

@ -33,6 +33,7 @@ from pygments.token import Punctuation, Whitespace, Text, Comment, Operator, \
Keyword, Name, String, Literal, Number, Generic
from sphinx.highlighting import lexers
class CustSqliteLexer(RegexLexer):
name = 'custsqlite'
@ -216,12 +217,13 @@ class CustSqliteLexer(RegexLexer):
def analyse_text(text):
return 0.01
lexers['custsqlite'] = CustSqliteLexer(startinline=True)
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
@ -240,57 +242,57 @@ templates_path = ['_templates']
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'lnav'
copyright = u'2021, Tim Stack'
copyright = u'2022, Tim Stack'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.10'
version = '0.11'
# The full version, including alpha/beta/rc tags.
release = '0.10.1'
release = '0.11.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
@ -305,122 +307,123 @@ html_theme_options = {
}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
def setup(app):
app.add_css_file('theme_overrides.css')
#html_context = {
# html_context = {
# 'css_files': [
# '_static/theme_overrides.css', # override wide tables in RTD theme
# ],
#}
# }
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'lnavdoc'
# -- Options for LaTeX output --------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# The font size ('10pt', '11pt' or '12pt').
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Additional stuff for the LaTeX preamble.
# 'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'lnav.tex', u'lnav Documentation',
u'Tim Stack', 'manual'),
('index', 'lnav.tex', u'lnav Documentation',
u'Tim Stack', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
@ -433,7 +436,7 @@ man_pages = [
]
# If true, show URL addresses after external links.
#man_show_urls = False
# man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------
@ -442,16 +445,16 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'lnav', u'lnav Documentation',
u'Tim Stack', 'lnav', 'One line description of project.',
'Miscellaneous'),
('index', 'lnav', u'lnav Documentation',
u'Tim Stack', 'lnav', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# texinfo_show_urls = 'footnote'

View File

@ -38,7 +38,7 @@ A valid **lnav** configuration file must contain an object with the
Options
-------
The following configuration options can be used to customize **lnav** to
The following configuration options can be used to customize the **lnav** UI to
your liking. The options can be changed using the :code:`:config` command.
.. jsonschema:: ../schemas/config-v1.schema.json#/properties/ui/properties/keymap
@ -201,6 +201,53 @@ Reference
.. jsonschema:: ../schemas/config-v1.schema.json#/properties/ui/properties/keymap-defs/patternProperties/([\w\-]+)
Log Handling
------------
The handling of logs is largely determined by the
:ref:`log file formats<log_formats>`, this section covers options that are not
specific to a particular format.
Watch Expressions (v0.11.0+)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Watch expressions can be used to fire an event when a log message matches a
condition. You can then install a listener for these events and trigger an
action to be performed. For example, to automate filtering based on
identifiers, a watch expression can match messages that mention the ID and then
a trigger can install a filter for that ID. Creating a watch expression is
done by adding an entry into the :code:`/log/watch-expressions` configuration
tree. For example, to create a watch named "dhcpdiscover" that matches
DHCPDISCOVER messages from the :code:`dhclient` daemon, you would run the
following:
.. code-block:: lnav
:config /log/watch-expressions/dhcpdiscover/expr :log_procname = 'dhclient' AND startswith(:log_body, 'DHCPDISCOVER')
The watch expression can refer to column names in the log message by prefixing
them with a colon. The expression is evaluated by passing the log message
fields as bound parameters and not against a table. The easiest way to test
out an expression is with the :ref:`mark_expr` command, since it will behave
similarly. After changing the configuration, you'll need to restart lnav
for the effect to take place. You can then query the :code:`lnav_events`
table to see any generated
:code:`https://lnav.org/event-log-msg-detected-v1.schema.json` events from the
logs that were loaded:
.. code-block:: custsqlite
;SELECT * FROM lnav_events
From there, you can create a SQLite trigger on the :code:`lnav_events` table
that will examine the event contents and perform an action. See the
:ref:`Events` section for more information on handling events.
Reference
^^^^^^^^^
.. jsonschema:: ../schemas/config-v1.schema.json#/properties/log/properties/watch-expressions/patternProperties/([\w\-]+)
.. _tuning:
Tuning

56
docs/source/events.rst Normal file
View File

@ -0,0 +1,56 @@
.. _Events:
Events (v0.11.0+)
=================
The events mechanism allows **lnav** to be automated based on events that
occur during processing. For example, filters could be added only when a
particular log file format is detected instead of always installing them.
Events are published through the :ref:`lnav_events<table_lnav_events>` SQLite
table. Reacting to events can be done by creating a SQLite trigger on the
table and inspecting the content of the event.
Trigger Example
---------------
The following is an example of a trigger that adds an out filter when a
syslog file is loaded. You can copy the code into an :file:`.sql` file and
install it by running :code:`lnav -i my_trigger.sql`.
.. code-block:: sql
:caption: my_trigger.sql
:linenos:
CREATE TRIGGER IF NOT EXISTS add_format_specific_filters
AFTER INSERT ON lnav_events WHEN
-- Check the event type
jget(NEW.content, '/$schema') =
'https://lnav.org/event-file-format-detected-v1.schema.json' AND
-- Only create the filter when a given format is seen
jget(NEW.content, '/format') = 'syslog_log' AND
-- Don't create the filter if it's already there
NOT EXISTS (
SELECT 1 FROM lnav_view_filters WHERE pattern = 'noisy message')
BEGIN
INSERT INTO lnav_view_filters (view_name, enabled, type, pattern) VALUES
('log', 1, 'OUT', 'noisy message');
END;
.. _event_reference:
Reference
---------
The following tables describe the schema of the event JSON objects.
.. jsonschema:: ../schemas/event-file-open-v1.schema.json#
:lift_description:
.. jsonschema:: ../schemas/event-file-format-detected-v1.schema.json#
:lift_description:
.. jsonschema:: ../schemas/event-log-msg-detected-v1.schema.json#
:lift_description:
.. jsonschema:: ../schemas/event-session-loaded-v1.schema.json#
:lift_description:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 674 KiB

View File

@ -1,4 +1,3 @@
.. _log_formats:
Log Formats
@ -55,6 +54,35 @@ own formats or if you need to modify existing ones. Format directories can
also contain '.sql' and '.lnav' script files that can be used automate log file
analysis.
Creating a Format Using Regex101.com (v0.11.0+)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For plain-text log files, the easiest way to create a log format definition is
to create the regular expression that recognizes log messages using
https://regex101.com . Simply copy a log line into the test string input box
on the site and then start editing the regular expression. When building the
regular expression, you'll want to use named captures for the structured parts
of the log message. Any raw message text should be matched by a captured named
"body". Once you have a regex that matches the whole log message, you can use
**lnav**'s "management CLI" to create a skeleton format file. The skeleton
will be populated with the regular expression from the site and the test
string, along with any unit tests, will be added to the "samples" list. The
"regex101 import" management command is used to create the skeleton and has
the following form:
.. prompt:: bash
lnav -m regex101 import <regex101-url> <format-name> [<regex-name>]
If the import was successful, the path to the new format file should be
printed out. The skeleton will most likely need some changes to make it
fully functional. For example, the :code:`kind` properties for captured values
default to :code:`string`, but you'll want to change them to the appropriate
type.
Format File Reference
^^^^^^^^^^^^^^^^^^^^^
An **lnav** format file must contain a single JSON object, preferably with a
:code:`$schema` property that refers to the
`format-v1.schema <https://lnav.org/schemas/format-v1.schema.json>`_,
@ -66,7 +94,7 @@ like so:
"$schema": "https://lnav.org/schemas/format-v1.schema.json"
}
Each format to be defined in the file should a separate field in the top-level
Each format to be defined in the file should be a separate field in the top-level
object. The field name should be the symbolic name of the format. This value
will also be used as the SQL table name for the log. The value for each field
should be another object with the following fields:
@ -83,11 +111,19 @@ should be another object with the following fields:
.. _format_regex:
:regex: This object contains sub-objects that describe the message formats
to match in a plain log file. Log files that contain JSON messages should
not specify this field.
to match in a plain-text log file. Each :code:`regex` MUST only match one
type of log message. It must not match log messages that are matched by
other regexes in this format. This uniqueness requirement is necessary
because **lnav** will "lock-on" to a regex and use it to match against
the next line in a file. So, if the regexes do not uniquely match each
type of log message, messages can be matched by the wrong regex. The
"lock-on" behavior is needed to avoid the performance hit of having to
try too many different regexes.
.. note:: Log files that contain JSON messages should not specify this field.
:pattern: The regular expression that should be used to match log messages.
The `PCRE <http://www.pcre.org>`_ library is used by **lnav** to do all
The `PCRE2 <http://www.pcre.org>`_ library is used by **lnav** to do all
regular expression matching.
:module-format: If true, this regex will only be used to parse message
@ -166,6 +202,16 @@ should be another object with the following fields:
to divide the timestamp by to get the number of seconds and fractional
seconds.
:subsecond-field: (v0.11.1+) The path to the property in a JSON-lines log
message that contains the sub-second time value
:subsecond-units: (v0.11.1+) The units of the subsecond-field property value.
The following values are supported:
:milli: for milliseconds
:micro: for microseconds
:nano: for nanoseconds
:ordered-by-time: (v0.8.3+) Indicates that the order of messages in the file
is time-based. Files that are not naturally ordered by time will be sorted
in order to display them in the correct order. Note that this sorting can
@ -247,6 +293,18 @@ should be another object with the following fields:
SELECT message FROM http_status_codes
WHERE status = :sc_status) || ') '
:tags: This object contains the tags that should automatically be added to
log messages.
:pattern: The regular expression evaluated over a line in the log file as
it is read in. If there is a match, the log message the line is a part
of will have this tag added to it.
:paths: This array contains objects that define restrictions on the file
paths that the tags will be applied to. The objects in this array can
contain:
:glob: A glob pattern to check against the log files read by lnav.
.. _format_sample:
:sample: A list of objects that contain sample log messages. All formats
@ -258,8 +316,8 @@ should be another object with the following fields:
does not match the level parsed by lnav for this sample message.
:highlights: This object contains the definitions for patterns to be
highlighted in a log message. Each entry should have a name and a
definition with the following fields:
highlighted in a log message. Each entry should have a name and a
definition with the following fields:
:pattern: The regular expression to match in the log message body.
:color: The foreground color to use when highlighting the part of the
@ -309,8 +367,8 @@ Example format:
}
}
Modifying an Existing Format
----------------------------
Patching an Existing Format
---------------------------
When loading log formats from files, **lnav** will overlay any new data over
previously loaded data. This feature allows you to override existing value or
@ -341,15 +399,15 @@ with the following contents:
Scripts
-------
Format directories may also contain '.sql' and '.lnav' files to help automate
Format directories may also contain :file:`.sql` and :file:`.lnav` files to help automate
log file analysis. The SQL files are executed on startup to create any helper
tables or views and the '.lnav' script files can be executed using the pipe
hotkey (|). For example, **lnav** includes a "partition-by-boot" script that
hotkey :kbd:`|`. For example, **lnav** includes a "partition-by-boot" script that
partitions the log view based on boot messages from the Linux kernel. A script
can have a mix of SQL and **lnav** commands, as well as include other scripts.
The type of statement to execute is determined by the leading character on a
line: a semi-colon begins a SQL statement; a colon starts an **lnav** command;
and a pipe (|) denotes another script to be executed. Lines beginning with a
and a pipe :code:`|` denotes another script to be executed. Lines beginning with a
hash are treated as comments. The following variables are defined in a script:
.. envvar:: #
@ -394,6 +452,12 @@ header:
:eval :filter-out ${pattern}
VSCode Extension
^^^^^^^^^^^^^^^^
The `lnav VSCode Extension <https://marketplace.visualstudio.com/items?itemName=lnav.lnav>`_
can be installed to add syntax highlighting to lnav scripts.
Installing Formats
------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -1,4 +1,3 @@
.. _hotkeys:
Hotkey Reference
@ -11,6 +10,8 @@ a more detailed explanation of each key.
Spatial Navigation
------------------
The majority of these hotkeys should be available in all views.
.. list-table::
:header-rows: 1
:widths: 6 6 6 20
@ -28,8 +29,8 @@ Spatial Navigation
- :kbd:`PgUp`
- Up a page
* - :kbd:`j`
- :kbd:`Return`
- :kbd:`↓`
-
- Down a line
* - :kbd:`k`
- :kbd:`↑`
@ -101,6 +102,9 @@ Spatial Navigation
Chronological Navigation
------------------------
These hotkeys are only functional on views that are time-based, like the log
view or the histogram view.
.. list-table::
:header-rows: 1
:widths: 5 5 20
@ -124,6 +128,44 @@ Chronological Navigation
- :kbd:`Shift` + :kbd:`r`
- Forward/backward by the relative time that was last used with the goto command.
Breadcrumb Navigation
---------------------
The following hotkeys are related to the breadcrumb bar that is below the top
status bar.
.. list-table::
:header-rows: 1
:widths: 5 20
* - Keypress
- Description
* - :kbd:`ENTER`
- Focus on the breadcrumb bar. Or, if the bar is currently focused,
accept the selected value and drop focus.
* - :kbd:`Escape`
- Drop focus on the breadcrumb bar.
* - :kbd:`←`
- Select the crumb to the left. If the first crumb is selected, the
selection will wrap around to the last crumb.
* - :kbd:`→`
- Accept the current value, which might mean navigating to the value in
the view, then selecting the crumb to the right.
* - :kbd:`Ctrl` + :kbd:`a`
- Select the first crumb.
* - :kbd:`Ctrl` + :kbd:`e`
- Select the last crumb.
* - :kbd:`↓`
- Select the next value in the crumb dropdown.
* - :kbd:`↑`
- Select the previous value in the crumb dropdown.
* - :kbd:`Home`
- Select the first value in the crumb dropdown.
* - :kbd:`End`
- Select the last value in the crumb dropdown.
While a crumb is selected, you can perform a fuzzy search on the possible
values by typing in the value you are interested in.
.. _hotkeys_bookmarks:
@ -149,6 +191,8 @@ Bookmarks
* - :kbd:`Shift` + :kbd:`c`
- Clear marked lines
.. _hotkeys_display:
Display
-------
@ -215,7 +259,8 @@ Session
* - Keypress
- Command
* - :kbd:`Ctrl` + :kbd:`R`
- Reset the current :ref:`session<sessions>` state.
- Reset the current :ref:`session<sessions>` state. The session state
includes things like filters, bookmarks, and hidden fields.
Query Prompts
-------------

View File

@ -1,8 +1,3 @@
.. lnav documentation master file, created by
sphinx-quickstart on Fri Jul 12 21:09:39 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to lnav's documentation!
================================
@ -15,19 +10,20 @@ Contents:
:maxdepth: 2
intro
usage
cookbook
howitworks
config
cli
ui
hotkeys
cli
usage
cookbook
config
formats
sessions
commands
sqlext
sqltab
events
data
howitworks
faq

View File

@ -1,4 +1,3 @@
Introduction
============
@ -18,8 +17,7 @@ Dependencies
When compiling from source, the following dependencies are required:
* `NCurses <http://www.gnu.org/s/ncurses/>`_
* `PCRE <http://www.pcre.org>`_ -- Versions greater than 8.20 give better
performance since the PCRE JIT will be leveraged.
* `PCRE2 <http://www.pcre.org>`_
* `SQLite <http://www.sqlite.org>`_
* `ZLib <http://wwww.zlib.net>`_
* `Bzip2 <http://www.bzip.org>`_
@ -93,6 +91,7 @@ The builtin keymaps are:
:de: `German <https://github.com/tstack/lnav/blob/master/src/keymaps/de-keymap.json>`_
:fr: `French <https://github.com/tstack/lnav/blob/master/src/keymaps/fr-keymap.json>`_
:sv: `Swedish <https://github.com/tstack/lnav/blob/master/src/keymaps/sv-keymap.json>`_
:uk: `United Kingdom <https://github.com/tstack/lnav/blob/master/src/keymaps/uk-keymap.json>`_
:us: `United States <https://github.com/tstack/lnav/blob/master/src/keymaps/us-keymap.json>`_

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 546 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 KiB

After

Width:  |  Height:  |  Size: 902 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 96 KiB

View File

@ -1,4 +1,3 @@
.. _sql-tab:
SQLite Tables Reference
@ -8,8 +7,11 @@ In addition to the tables generated for each log format, **lnav** includes
the following tables/views:
* `environ`_
* `lnav_events`_
* `lnav_file`_
* `lnav_user_notifications`_
* `lnav_views`_
* `lnav_views_echo`_
* `lnav_view_stack`_
* `lnav_view_filters`_
* `lnav_view_filter_stats`_
@ -51,6 +53,22 @@ named "FILENAME" and then open it in **lnav** by referencing it with
:open $FILENAME
.. _table_lnav_events:
lnav_events
-----------
The **lnav_events** table allows you to react to events that occur while
**lnav** is running using SQLite triggers. For example, when a file is
opened, a row is inserted into the :code:`lnav_events` table that contains
a timestamp and a JSON object with the event ID and the path of the file.
The following columns are available in this table:
:ts: The timestamp of the event.
:content: A JSON object that contains the event information. See the
:ref:`event_reference` for more information about the types
of events that are available.
lnav_file
---------
@ -68,6 +86,37 @@ following columns are available in this table:
:time_offset: The millisecond offset for timestamps. This column can be
UPDATEd to change the offset of timestamps in the file.
.. _table_lnav_user_notifications:
lnav_user_notifications
-----------------------
The :code:`lnav_user_notifications` table allows you to display a custom message
in the top-right corner of the UI. For example, to display "Hello, World!",
you can enter:
.. code-block:: custsqlite
;REPLACE INTO lnav_user_notifications (message) VALUES ('Hello, World!')
There are additional columns to have finer control of what is displayed and
when:
:id: The unique ID for the message, defaults to "org.lnav.user". This is
the primary key for the table, so more than one type of message is not
allowed.
:priority: The priority of the message. Higher priority messages will be
displayed until they are cleared or are expired.
:created: The time the message was created.
:expiration: The time when the message should expire or NULL if it should
not automatically expire.
:views: A JSON array of view names where the message is applicable or NULL
if the message should be shown in all views.
:message: The message itself.
This table will most likely be used in combination with :ref:`Events` and the
`lnav_views_echo`_ table.
lnav_views
----------
@ -89,6 +138,17 @@ available in this table:
:search: The search string for this view. This value can be UPDATEd to
initiate a text search in this view.
lnav_views_echo
---------------
The :code:`lnav_views_echo` table is a real SQLite table that you can create
TRIGGERs on in order to react to users moving around in a view.
.. note::
The table is periodically updated to reflect the current state of the views.
The changes are *not* performed immediately after the user action.
lnav_view_stack
---------------
@ -137,6 +197,8 @@ with the **lnav_view_filter_stats** table into a single view for ease of use.
all_logs
--------
.. f0:sql.tables.all_logs
The **all_logs** table lets you query the format derived from the **lnav**
log message parser that is used to automatically extract data, see
:ref:`data-ext` for more details.

View File

@ -1,48 +1,113 @@
.. _ui:
User Interface
==============
The main part of the display shows the log messages from all files sorted by the
message time. Status bars at the top and bottom of the screen can given you an
idea of where you are in the logs. And, the last line is used for entering
commands. Navigation is controlled by a series of hotkeys, see :ref:`hotkeys`
for more information.
The **lnav** TUI displays the content of the current "view" in the middle,
with status bars above and below, and the interactive prompt as the last line.
.. figure:: lnav-ui.png
:align: center
:alt: Screenshot showing syslog messages.
:alt: Screenshot of lnav showing a mix of syslog and web access_log messages.
Screenshot of **lnav** viewing syslog messages.
Screenshot of **lnav** viewing syslog and web access_log messages.
On color displays, the log messages will be highlighted as follows:
* Errors will be colored in red;
* warnings will be yellow;
* search hits are reverse video;
* various color highlights will be applied to: IP addresses, SQL keywords,
XML tags, file and line numbers in Java backtraces, and quoted strings;
* "identifiers" in the messages will be randomly assigned colors based on their
content (works best on "xterm-256color" terminals).
The default view shows the log messages from the log files that have been
loaded. There are other views for displaying content like plaintext files
and SQL results. The :ref:`ui_views` section describes the characteristics of
each view in more detail. You can switch to the different views using the
hotkeys described in the :ref:`hotkeys_display` section or by pressing
:kbd:`ENTER` to activate the breadcrumb bar, moving to the first crumb, and
then selecting the desired view. You can switch back to the previous view by
pressing :kbd:`q`. You can switch forward to the new view by pressing
:kbd:`a`. If the views are time-based (e.g. log and histogram), pressing
:kbd:`Shift` + :kbd:`q` and :kbd:`Shift` + :kbd:`a` will synchronize the top
times in the views.
The right side of the display has a proportionally sized 'scrollbar' that
shows:
* your current position in the file;
* the locations of errors/warnings in the log files by using a red or yellow
* the current position in the file;
* the locations of errors/warnings in the log files by using red or yellow
coloring;
* the locations of search hits by using a tick-mark pointing to the left;
* the locations of bookmarks by using a tick-mark pointing to the right.
Above and below the main body are status lines that display:
Top Status Bar
--------------
* the current time;
* the name of the file the top line was pulled from;
* the log format for the top line;
* the current view;
* the line number for the top line in the display;
* the current search hit, the total number of hits, and the search term;
The top status bar shows the current time and messages stored in the
:ref:`table_lnav_user_notifications` table.
Below the top status bar is the breadcrumb bar that displays the semantic
location of the top line in the main view. For example, within a
pretty-printed JSON document, it will show the path to property at the top
of the view. The actual content of the bar depends on the current view and
will be updated as you navigate around the main view. The bar can also be
used to navigate around the document by focusing on it.
Breadcrumb Bar
--------------
.. figure:: lnav-breadcrumbs-help.png
:align: center
:figwidth: 90%
Screenshot of the breadcrumb bar focused and navigating the help text
To focus on the breadcrumb bar, press :kbd:`ENTER`. The :kbd:`←`/:kbd:`→`
cursor keys can be used to select a crumb and the :kbd:`↑`/:kbd:`↓` keys can
be used select a value of that crumb. To accept a value and drop focus on the
bar, press :kbd:`ENTER`. To accept a value and move to the next crumb, press
:kbd:`→`. Using :kbd:`→` makes it quicker to drill down into a document
without having to constantly switch focus. To drop focus on the bar without
accepting anything, press :kbd:`Escape`.
There are three types of crumbs:
* a dropdown where one of a limited set of values can be selected;
* a combobox where a value can be entered directly or selected;
* a numeric input for entering array indexes.
When a dropdown or combobox is selected, you can type part of the desired value
to filter the list of values. For example, the first crumb is always the
current view, typing in "hi" will filter the list down to the "HIST" value.
Configuration Panels
--------------------
.. figure:: lnav-config-header.png
:align: center
:figwidth: 90%
Screenshot of the header for the configuration panels when they are hidden.
After the main view content, there is a header bar for two configuration
panels: Files and Filters. These panels provide visual access to parts of
lnav's configuration. To access the panels, press the :kbd:`TAB` key.
To hide the panels again, press :kbd:`q`.
.. figure:: lnav-files-panel.png
:align: center
:figwidth: 90%
Screenshot of the files panel showing the loaded files.
The Files panel is open initially to display progress in loading files.
The following information can be displayed for each file:
* the "unique" portion of the path relative to the other files;
* the amount of data that has been indexed;
* the date range of log messages contained in the file;
* the errors that were encountered while trying to index the file;
* the notes recorded for files where some automatic action was taken,
like hiding the file if it was seen as a duplicate of another file.
.. figure:: lnav-filters-panel.png
:align: center
:figwidth: 90%
Screenshot of the filters panel showing an OUT and a disabled IN filter.
If the view supports filtering, there will be a status line showing the
following:
@ -54,16 +119,162 @@ To edit the filters, you can press TAB to change the focus from the main
view to the filter editor. The editor allows you to create, enable/disable,
and delete filters easily.
Bottom Status Bar
-----------------
The second to last line is the bottom status bar, which shows the following:
* the line number of the top line, starting from zero;
* the location within the view, as a percentage;
* the current search hit, the total number of hits, and the search term;
* the loading indicator.
When the interactive prompt is active, this bar can show the prompt
description, help text, or error message.
Prompt
------
Finally, the last line on the display is where you can enter search
patterns and execute internal commands, such as converting a
unix-timestamp into a human-readable date. The command-line is by
the readline library, so the usual set of keyboard shortcuts can
be used.
unix-timestamp into a human-readable date. The following key-presses
will activate a corresponding prompt:
The body of the display is also used to display other content, such
as: the help file, histograms of the log messages over time, and
SQL results. The views are organized into a stack so that any time
you activate a new view with a key press or command, the new view
is pushed onto the stack. Pressing the same key again will pop the
view off of the stack and return you to the previous view. Note
that you can always use 'q' to pop the top view off of the stack.
* :kbd:`/` - The search prompt. You can enter a PCRE2-flavored regular
expression to search for in the current view.
* :kbd:`:` - The command prompt. Commands are used to perform common
operations.
* :kbd:`;` - The SQL prompt. SQL queries can be used for log analysis
and manipulating **lnav**'s state.
* :kbd:`|` - The script prompt. Enter a path to the lnav script to
execute, along with the arguments to pass in.
The command-line is by the readline library, so the usual set of keyboard
shortcuts can be used for editing and moving within the command-line.
.. _ui_views:
Views
-----
The accessible content within lnav is separated into the following views.
LOG
^^^
The log view displays the log messages from any loaded log files in time
order. This view will be shown by default if any log messages are available.
On color displays, the log messages will be highlighted as follows:
* Errors will be colored in red;
* warnings will be yellow;
* search hits are reverse video;
* various color highlights will be applied to: IP addresses, SQL keywords,
XML tags, file and line numbers in Java backtraces, and quoted strings;
* "identifiers" in the messages will be randomly assigned colors based on their
content (works best on "xterm-256color" terminals).
.. note::
If the coloring is too much for your tastes, you can change to the
"grayscale" theme by entering the following command:
.. code-block:: lnav
:config /ui/theme grayscale
.. note::
If a log message has a timestamp that is out-of-order with its neighboring
messages, the timestamp will be highlighted in yellow. When one of these
messages is at the top of the log view, an overlay will display the
difference between the "actual time" and the "received time". The "actual
time" is the original textual timestamp. The "received time" is the time
of an earlier message that is larger than this log message's time.
The breadcrumb bar will show the following crumbs:
* the timestamp for the top line;
* the log format for the top line;
* the name of the file the top line was pulled from;
* the "operation ID" of the top log message, if it is supported by the log
format.
These crumbs are interactive and can be used to navigate to different parts
of the log view. For example, selecting a different value in the log format
crumb will jump to the first message with that format.
TEXT
^^^^
The text view displays files for which lnav could not detect any log messages.
Markdown
""""""""
Files with an :code:`.md` (or :code:`.markdown`) extension will be treated as
Markdown files and rendered separately.
DB
^^
The DB view shows the results of queries done through the SQLite interface.
You can execute a query by pressing :kbd:`;` and then entering a SQL statement.
You can switch to the SQL view by pressing :kbd:`v`.
HELP
^^^^
The help view displays the builtin help text. Press :kbd:`?` to switch to the
help view at any time. While in the help view, the breadcrumb bar can be used
to navigate to different sections of the document.
HIST
^^^^
The histogram view displays a stacked bar chart of messages over time
classified by their log level and whether they've been bookmarked. Press
:kbd:`i` to switch back and forth to the histogram view. You can also press
:kbd:`Shift`+:kbd:`i` to toggle the histogram view while synchronizing the top
time. While in the histogram view, pressing :kbd:`z`/:kbd:`Shift`+:kbd:`z`
will zoom in/out.
PRETTY
^^^^^^
The pretty-print view takes the text displayed in the current view and shows
the result of a pretty-printer run on that text. For example, if a log
message contained an XML message on a single line, the pretty-printer would
break the XML across multiple lines with appropriate indentation.
SCHEMA
^^^^^^
The schema view displays the current schema of the builtin SQLite database.
SPECTRO
^^^^^^^
The spectrogram view is a "three"-dimensional display of data points of a log
field or a SQL query column. The dimensions are time on the Y axis, the range
of data point values on the X axis, and the number of data points as a color.
For example, if you were to visualize process CPU usage over time, the range
of values on the X axis would be CPU percentages and there would be colored
blocks at each point on the line where a process had that CPU percentage, like
so
.. figure:: lnav-spectro-cpu-pct.png
:align: center
Screenshot of the **lnav** spectrogram view showing CPU usage of processes.
The colors correspond to the relative number of data points in a bucket.
The legend overlaid at the top line in the view shows the counts of data
points that are in a particular color, with green having the fewest number of
data points, yellow the middle, and red the most. You can select a particular
bucket using the cursor keys to see the exact number of data points and the
range of values. The panel at the bottom of the view shows the data points
themselves from the original source, the log file or the SQL query results.
You can press :kbd:`TAB` to focus on the details panel so you can scroll
around and get a closer look at the values.

View File

@ -1,4 +1,3 @@
.. _usage:
Usage
@ -47,6 +46,8 @@ by pressing :kbd:`t`.
Archive Support
^^^^^^^^^^^^^^^
.. f0:archive
If **lnav** is compiled with `libarchive <https://www.libarchive.org>`_,
any files to be opened will be examined to see if they are a supported archive
type. If so, the contents of the archive will be extracted to the
@ -111,6 +112,9 @@ file.
machine and OS (i.e. MacOS, Linux, FreeBSD, Windows). The binary is
baked into the lnav executable itself, so there is no extra setup that
needs to be done on the remote machine.
The binary file is named ``tailer.bin.XXXXXX`` where *XXXXXX* is 6 random digits.
The file is, under normal circumstancies, deleted immediately.
Searching
---------
@ -172,15 +176,27 @@ Log level
^^^^^^^^^
To hide messages below a certain log level, you can use the
:ref:`:set-min-log-level<set_min_log_level>`.
:ref:`:set-min-log-level<set_min_log_level>` command.
.. _search_tables:
Search Tables
-------------
TBD
Search tables allow you to access arbitrary data in log messages through
SQLite virtual tables. If there is some data in a log message that you can
match with a regular expression, you can create a search-table that matches
that data and any capture groups will be plumbed through as columns in the
search table.
Creating a search table can be done interactively using the
:ref:`:create-search-table<create_search_table>` command or by adding it to
a :ref:`log format definition<log_formats>`. The main difference between
the two is that tables defined as part of a format will only search messages
from log files with that format and the tables will include log message
columns defined in that format. Whereas a table created with the command
will search messages from all different formats and no format-specific
columns will be included in the table.
.. _taking_notes:
@ -246,3 +262,30 @@ commands into a :ref:`script<scripts>` and execute that script with the
.. [#] The expression :code:`regexp_match('bound to ([^ ]+)', log_body) as ip`
can be used to extract the IP address from the log message body.
Sharing Sessions With Others
----------------------------
After setting up filters, bookmarks, and making notes, you might want to share
your work with others. If they have access to the same log files, you can
use the :ref:`:export-session-to<export_session_to>` command to write an
executable **lnav** script that will recreate the current session state. The
script contains various SQL statements and **lnav** commands that capture the
current state. So, you should feel free to modify the script or use it as a
reference to learn about more advanced uses of lnav.
The script will capture the file paths that were explicitly specified and
not the files that were actually opened. For example, if you specified
"/var/log" on the command line, the script will include
:code:`:open /var/log/*` and not an individual open for each file in that
directory.
Also, in order to support archives of log files, lnav will try to find the
directory where the archive was unpacked and use that as the base for the
:code:`:open` command. Currently, this is done by searching for the top
"README" file in the directory hierarchy containing the files [1]_. The
consumer of the session script can then set the :code:`LOG_DIR_0` (or 1, 2,
...) environment variable to change where the log files will be loaded from.
.. [1] It is assumed a log archive would have a descriptive README file.
Other heuristics may be added in the future.

View File

@ -0,0 +1,9 @@
# Playground
Welcome to the **lnav** playground!
There are some sample files loaded into the log and text views.
Press `q` to switch back to the log view and start exploring.
You can also press `f` in this view to switch to the other
text files that are loaded, like a markdown sample.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,16 @@
#!/bin/bash
export LNAVSECURE=1
export TERM=xterm-256color
timeout --foreground --kill-after=30s 10m lnav \
-d "/tmp/$(echo "playground."$(date "+%Y-%m-%dT%H-%M-%S")".$$.log")" \
/tutorials/playground/logs \
/tutorials/playground/text \
/tutorials/playground/index.md#playground
if [ $? = 124 ]; then
echo "error: reached connection time limit, reconnect if you're not a bot."
else
echo "Thanks for trying out lnav! Have a nice day!"
fi

View File

@ -0,0 +1,157 @@
An h1 header
============
Paragraphs are separated by a blank line.
2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists
look like:
* this one
* that one
* the other one
Note that --- not considering the asterisk --- the actual text
content starts at 4-columns in.
> Block quotes are
> written like so.
>
> They can span multiple paragraphs,
> if you like.
Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all
in chapters 12--14"). Three dots ... will be converted to an ellipsis.
Unicode is supported. ☺
An h2 header
------------
Here's a numbered list:
1. first item
2. second item
3. third item
Note again how the actual text starts at 4 columns in (4 characters
from the left side). Here's a code sample:
# Let me re-iterate ...
for i in 1 .. 10 { do-something(i) }
As you probably guessed, indented 4 spaces. By the way, instead of
indenting the block, you can use delimited blocks, if you like:
~~~
define foobar() {
print "Welcome to flavor country!";
}
~~~
(which makes copying & pasting easier). You can optionally mark the
delimited block for Pandoc to syntax highlight it:
~~~python
import time
# Quick, count to ten!
for i in range(10):
# (but not *too* quick)
time.sleep(0.5)
print i
~~~
### An h3 header ###
Now a nested list:
1. First, get these ingredients:
* carrots
* celery
* lentils
2. Boil some water.
3. Dump everything in the pot and follow
this algorithm:
find wooden spoon
uncover pot
stir
cover pot
balance wooden spoon precariously on pot handle
wait 10 minutes
goto first step (or shut off burner when done)
Do not bump wooden spoon or it will fall.
Notice again how text always lines up on 4-space indents (including
that last line which continues item 3 above).
Here's a link to [a website](https://lnav.org), to a [local
doc](../index.md), and to a [section heading in the current
doc](#an-h2-header). Here's a footnote [^1].
[^1]: Footnote text goes here.
Tables can look like this:
size material color
---- ------------ ------------
9 leather brown
10 hemp canvas natural
11 glass transparent
Table: Shoes, their sizes, and what they're made of
(The above is the caption for the table.) Pandoc also supports
multi-line tables:
-------- -----------------------
keyword text
-------- -----------------------
red Sunsets, apples, and
other red or reddish
things.
green Leaves, grass, frogs
and other things it's
not easy being.
-------- -----------------------
A horizontal rule follows.
***
Here's a definition list:
apples
: Good for making applesauce.
oranges
: Citrus!
tomatoes
: There's no "e" in tomatoe.
Again, text is indented 4 spaces. (Put a blank line between each
term/definition pair to spread things out more.)
Here's a "line block":
| Line one
| Line too
| Line tree
and images can be specified like so:
![example image](../../../assets/images/lnav-front-page.png "An exemplary image")
Inline math equations go in like so: $\omega = d\phi / dt$. Display
math should get its own line and be put in in double-dollarsigns:
$$I = \int \rho R^{2} dV$$
And note that you can backslash-escape any punctuation characters
which you wish to be displayed literally, ex.: \`foo\`, \*bar\*, etc.

View File

@ -0,0 +1,18 @@
{
"$schema": "https://lnav.org/schemas/config-v1.schema.json",
"global": {
"lnav_tutorial_name": "tutorial1"
},
"ui": {
"keymap-defs": {
"default": {
"x79": {
"command": "|lnav-tutorial-key-handler next"
},
"x59": {
"command": "|lnav-tutorial-key-handler prev"
}
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More