Compare commits

...

1262 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
Timothy Stack f74214b9b6 [sql] add a gunzip() SQL function 2021-10-26 09:39:05 -07:00
Timothy Stack b8945232f7 [test] update expected help output 2021-10-23 14:57:19 -07:00
Tim Stack b9b4d24933
Merge pull request #932 from eladeyal-intel/patch-1
Clarify that keybindings listed are default
2021-10-18 13:14:46 -07:00
Timothy Stack f33a9a580b [docs] add clipboard to the tuning section 2021-10-18 09:03:12 -07:00
eladeyal-intel 0f25ec6c3b
Clarify that keybindings listed are default
User can changfe the keybindings and the help message would not be updated.
2021-10-18 08:09:29 +03:00
Timothy Stack fa3c7048c9 [logfmt] remove noisy log message 2021-10-16 08:52:15 -07:00
Timothy Stack 561262c2f9 [perf] fix a performance issue when interactively loading a text file 2021-10-07 09:29:37 -07:00
Timothy Stack 3d31b2b723 [build] fix lib link order 2021-10-03 13:54:09 -07:00
Timothy Stack 7627c41802 [build] missing file 2021-10-03 12:52:29 -07:00
Timothy Stack 19fd336e9a [formats] add logfmt 2021-10-02 23:17:33 -07:00
Timothy Stack 782878b05c [tests] fix builddir 2021-10-02 23:03:23 -07:00
Timothy Stack 6e6487935a [test] fix broken path 2021-10-02 22:38:14 -07:00
Timothy Stack 008b1c827b [build] fix some 32-bit build issues 2021-10-02 16:29:15 -07:00
Timothy Stack 5089347e82 [views] fix some issues on shutdown 2021-10-01 22:34:39 -07:00
Tim Stack a9278b400d
Update snapcraft.yaml 2021-10-01 18:43:14 -07:00
Tim Stack 1c8e0f2ef3
Update snapcraft.yaml 2021-10-01 18:27:27 -07:00
Timothy Stack 7c51c3264b [snap] bump lib version 2021-10-01 18:08:28 -07:00
Tim Stack 1bc6b91dd7
Update snapcraft.yaml 2021-10-01 17:37:16 -07:00
Timothy Stack d71fd7bff2 [snap] bump curses version 2021-10-01 16:19:35 -07:00
Timothy Stack 2cac26cc00 [input] try fix handling of modifier+cursor keys 2021-10-01 15:58:44 -07:00
Timothy Stack 3c36869711 [looper] check for POLLHUP on stdin
Fixes #919
2021-10-01 09:31:39 -07:00
Timothy Stack b3b8ed7f07 [bump] update doctest version 2021-09-27 22:17:02 -07:00
Timothy Stack d228c5a9e1 [build] fix for static 2021-09-27 22:02:32 -07:00
Timothy Stack dc0b7ff631 [cmake] run cmake-format 2021-09-27 15:59:23 -07:00
Timothy Stack b884f732f2 [json-ext] json_contains() should accept null
Related to #447
2021-09-27 15:54:10 -07:00
Timothy Stack 954e368974 [build] rejigger doctest inclusion a bit 2021-09-26 22:01:40 -07:00
Timothy Stack 4ba892677e [snap] try to get git working 2021-09-26 21:14:54 -07:00
Timothy Stack 644c61c82a [snap] add removable-media plug and curl pkg 2021-09-26 02:15:58 -07:00
Timothy Stack cb3e587cb4 [snap] add git/ssh deps 2021-09-26 01:54:06 -07:00
Tim Stack f4d9e51f4c
Merge pull request #915 from bowlofeggs/optional_system_doctest
Provide a configure flag to use the system doctest
2021-09-25 22:37:33 -07:00
Timothy Stack 68d7d64948 [rebuild] some more cleanup 2021-09-25 15:35:44 -07:00
Timothy Stack 1c5567157f [build] use other #define for max 2021-09-24 09:35:01 -07:00
Timothy Stack 458b959a13 [headless] fix an issue with headless rebuilds 2021-09-24 09:30:03 -07:00
Timothy Stack 272de832d5 [build] silence a warning 2021-09-23 21:39:28 -07:00
Timothy Stack 3c5b86b5ed [lnav.org] fix download link 2021-09-23 21:20:50 -07:00
Timothy Stack 2edc3c8382 [lnav_log] fix issue when the debug log file couldn't be opened
Related to #866
2021-09-23 13:13:01 -07:00
Timothy Stack 806e3d934e [ptimec] use FOR_BUILD version of some defines 2021-09-23 12:37:27 -07:00
Timothy Stack 90b8e85e62 [tools] need to use FOR_BUILD version of some defines
Related to #916
2021-09-23 12:34:40 -07:00
Timothy Stack 90b513499c tweak file format display 2021-09-22 23:13:31 -07:00
Timothy Stack b2f11ac27f [intern] some cleanup 2021-09-22 16:01:03 -07:00
Timothy Stack d6535c40f6 [deps] bump sqlite version used in release build 2021-09-21 23:01:22 -07:00
Timothy Stack ecb4084b37 [logfile_sub_source] remove alternate 5 min highlight 2021-09-18 21:38:43 -07:00
Randy Barlow 85515b2c19
Provide a configure flag to use the system doctest
This will allow distributions to more easily maintain
incompatibilies between doctest and the rest of their software.

Fixes #912

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
2021-09-18 23:31:21 -04:00
Timothy Stack 6761e2d7df [usage] add some symbols to the usage message 2021-09-17 21:56:35 -07:00
tstack 2315fc8871 Update tailer 2021-09-17 21:02:21 +00:00
Timothy Stack c317008463 [remote] fix issue with symlinked files 2021-09-17 14:01:52 -07:00
tstack fa8dc6214f Update tailer 2021-09-17 20:14:55 +00:00
Timothy Stack 2f9f72762f [tailer] some more fixes 2021-09-17 13:14:19 -07:00
tstack f5f41ffad9 Update tailer 2021-09-17 04:59:16 +00:00
Timothy Stack 4fc6e60d10 [tailer] fix init offer 2021-09-16 21:58:11 -07:00
Timothy Stack d1fb112223 [snap] more locale stuff 2021-09-16 06:47:55 -07:00
Timothy Stack 88029aa847 [snap] add locales-all to stage-packages 2021-09-15 22:40:32 -07:00
Timothy Stack d239bb4594 [vum/configmanager] make the clipboard commands configurable 2021-09-15 21:29:55 -07:00
Timothy Stack 4d16be7b6e [snap] try adding xclip to stage-packages 2021-09-14 23:15:52 -07:00
Timothy Stack 8394453c8d [snap] missed selective-checkout deps 2021-09-14 22:58:48 -07:00
Timothy Stack 98bc71914b [sysclip] log the detected clipboard commands and add x11 to snap 2021-09-14 22:31:38 -07:00
tstack cddad0ac92 Update tailer 2021-09-15 04:45:14 +00:00
Timothy Stack 47964ac852 [build] missing include 2021-09-14 21:44:35 -07:00
tstack 90cae9d59b Update tailer 2021-09-15 04:38:23 +00:00
Timothy Stack e8f3468801 [build] missing include 2021-09-14 21:37:49 -07:00
Timothy Stack a50c806bd9 [build] fix hash type 2021-09-14 21:34:37 -07:00
tstack ca98425e10 Update tailer 2021-09-15 04:28:55 +00:00
Timothy Stack a125e49415 [build] fix ape build 2021-09-14 21:28:15 -07:00
Timothy Stack aae83a6a10 [remote] optimize file syncing 2021-09-14 21:20:25 -07:00
Timothy Stack aa30526a54 [help] add some more stuff to the search syntax help prompt 2021-09-10 21:01:40 -07:00
Timothy Stack 107199cb7c [remote] clean up the cache 2021-09-10 21:01:25 -07:00
Timothy Stack f6e245c04a [sql] jget() is not returning values with the right sqlite type 2021-09-09 22:22:52 -07:00
Timothy Stack 7252e5fc0f [views] fix an issue with the log view not updating when switching back from text 2021-09-09 13:03:43 -07:00
Timothy Stack d4d0a6165f [views] view not updated after pop 2021-09-09 11:48:00 -07:00
Timothy Stack 4bee577b26 [snapcraft.yaml] bump selective-checkout version 2021-09-09 09:17:52 -07:00
Timothy Stack b3a4eadbe2 [cmds] add :show-only-this-file command 2021-09-08 14:56:18 -07:00
Timothy Stack dd527cf6d4 [version] bump to v0.10.1 2021-09-08 14:43:16 -07:00
Timothy Stack c308a3b17a [build] fix a build issue 2021-09-08 08:46:29 -07:00
Timothy Stack b6b0578027 [file_collection] check for file closure in same_file
Fixes #908
2021-09-07 23:07:34 -07:00
Timothy Stack 86e84e1dab [distclean] more files to remove 2021-09-07 22:39:39 -07:00
Timothy Stack 1e1abcc97e [distclean] remove some extra files 2021-09-07 22:24:01 -07:00
Timothy Stack db7173caec [views] fix some issues with empty views
Related to #908
2021-09-07 21:08:01 -07:00
Timothy Stack 312a97bca7 [logfile] tweak overwrite detection to ignore remote files
The mtime of a remote file is not adjusted in an atomic fashion,
so it can cause a spurious overwrite signal
2021-09-07 14:23:12 -07:00
Timothy Stack 0de76b29c8 [files] fix refreshing files with errors and auto-switching to text view
Fixes #909
2021-09-03 12:33:11 -07:00
Tim Stack 869b10c3fc
Update test_remote.sh 2021-08-30 06:21:22 -07:00
Tim Stack fbdcca97e1
Update test_remote.sh 2021-08-30 06:01:50 -07:00
Timothy Stack 2df39916f9 [tests] debug remote test 2021-08-29 22:56:08 -07:00
Timothy Stack 42d2aa063a [tests] add missing test logfile to dist 2021-08-29 22:30:21 -07:00
Timothy Stack c462830be1 [tests] try to fix sql test 2021-08-29 22:00:21 -07:00
Timothy Stack aa9947fbb0 [tests] try to fix ci test failures 2021-08-29 08:46:10 -07:00
Timothy Stack 2000513135 [tests] set XDG_CONFIG_HOME too 2021-08-29 07:35:55 -07:00
Tim Stack 49576d8450
Update c-cpp.yml 2021-08-29 06:50:16 -07:00
Tim Stack 0fcda9adec
Update test_meta.sh 2021-08-29 06:31:45 -07:00
Timothy Stack ec4e36b10c [build] skip make for ci build 2021-08-28 22:59:42 -07:00
Timothy Stack 67557c829a [tests] debugging 2021-08-28 22:50:52 -07:00
Timothy Stack a7edb40cf7 [tests] fix expected output 2021-08-28 22:14:24 -07:00
Timothy Stack c13e1f3a00 [build] missed distributing some test files 2021-08-28 22:01:36 -07:00
Timothy Stack 804056c1c3 remove unused var 2021-08-28 21:39:10 -07:00
Timothy Stack 7eb1d17bef [files] highlight issues with opening files
Fixes #904
2021-08-27 22:37:10 -07:00
Timothy Stack 1df74411c2 [field-overlay] fix out-of-time-order message overlay
Related to #902
2021-08-26 09:29:40 -07:00
Timothy Stack 03ce38b09f [bottom-status] make sure the search term is updated
Fixes #907
2021-08-26 09:11:30 -07:00
Timothy Stack 426e70b99f [field-overlay] use log_time instead of the name from the format
Related to #902
2021-08-26 09:11:30 -07:00
Tim Stack ab9cedeb7d [build] try to cat output 2021-08-25 11:44:31 -07:00
Timothy Stack 87ae18238b [build] try to fix tailer test 2021-08-25 10:28:00 -07:00
Tim Stack 283cdf7ca6
Merge pull request #906 from a1346054/master
Minor cleanup
2021-08-25 09:21:06 -07:00
a1346054 e68be8f447 remove trailing whitespace 2021-08-25 11:21:07 +00:00
a1346054 f30ed34a22 fix spelling 2021-08-25 11:20:38 +00:00
a1346054 65791b79ef [docs]: use https link 2021-08-25 11:19:26 +00:00
a1346054 a362683dc8 [release]: invoke bash through /usr/bin/env
This makes sure that the expected bash is ran, instead of the hardcoded
version which may or may not exist at that path.
2021-08-25 10:58:46 +00:00
a1346054 4406feba3b [vagrant]: fix shellcheck identified issues in scripts 2021-08-25 10:56:15 +00:00
a1346054 b402e79e9e [vagrant]: use https link in resulting package 2021-08-25 10:55:58 +00:00
a1346054 03fd7cc52d [example files]: fix shellcheck identified issues 2021-08-25 10:45:51 +00:00
a1346054 1bd81ec630 [example scripts]: fix case when logfile contains a space character 2021-08-25 10:45:28 +00:00
a1346054 285e171b54 Add final linux LF newline 2021-08-25 10:12:38 +00:00
Timothy Stack ef276bce72 [actions] try again 2021-08-23 23:05:28 -07:00
Timothy Stack 65acae6f0e [actions] try to debug test failure 2021-08-23 22:51:46 -07:00
Timothy Stack 211f10535c [cmds] add --view flag 2021-08-23 22:25:38 -07:00
Timothy Stack 97530070c9 [cmds] add /dev/clipboard support to :redirect-to 2021-08-22 13:50:53 -07:00
Timothy Stack c9d22e7941 [db-view] fix scrolling performance 2021-08-17 10:43:58 -07:00
Timothy Stack 383bf71f26 [filters-view] key capture fix
Fixes #898
2021-08-16 10:29:59 -07:00
Timothy Stack e33fe1a85b [config] include values from the configs dir in the default config 2021-08-15 22:58:58 -07:00
Timothy Stack ce8397b5cf [view_curses] only write OSC;send-input in the test env
Fixes #895
2021-08-15 14:47:55 -07:00
Timothy Stack b6cb1e6dda [blog] update v0.10.0 links 2021-08-09 22:18:40 -07:00
Timothy Stack 981bced044 [release] update download links 2021-08-05 21:59:37 -07:00
Timothy Stack 7a66283bf2 [readline] fix TAB-completion for tilde paths 2021-07-14 11:16:51 -07:00
Tim Stack 581ab446ba
Merge pull request #884 from tstack/dependabot/bundler/docs/addressable-2.8.0
Bump addressable from 2.7.0 to 2.8.0 in /docs
2021-07-13 22:31:17 -07:00
dependabot[bot] 943f243f3a
Bump addressable from 2.7.0 to 2.8.0 in /docs
Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/sporkmonger/addressable/releases)
- [Changelog](https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sporkmonger/addressable/compare/addressable-2.7.0...addressable-2.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-14 05:30:06 +00:00
Timothy Stack 65a7bd7bd6 [time-fmt] add a time format 2021-07-13 10:40:24 -07:00
Timothy Stack 5f1dbac193 [site] add some links to beta release 2021-07-13 09:55:38 -07:00
Timothy Stack 6c6a5c11cc [docs] fix schema paths in the config docs 2021-07-07 09:47:15 -07:00
Timothy Stack ea34d7cd5f [cmds] change umask
Fixes #540
2021-07-04 13:51:31 -07:00
Timothy Stack b184272edb [file_collection] fix recursion
Fixes #877
2021-07-03 21:57:50 -07:00
Timothy Stack 4a11b737df [blog] add post about the tailer 2021-06-24 22:22:10 -07:00
Timothy Stack 23cb718d65 [overlay] remove "Last message:"
Fixes #876
2021-06-24 20:53:40 -07:00
Timothy Stack 4445a54847 [tailer] always update the remote description 2021-06-23 10:09:14 -07:00
Timothy Stack 872b9411aa [site] fix copy-pasta for pretty print screen shot
Fixes #875
2021-06-22 09:16:50 -07:00
Timothy Stack 9fffa728de [build] tweak mlc config path 2021-06-21 14:37:26 -07:00
Timothy Stack d42006d0a9 [build] minor fixes 2021-06-21 14:34:13 -07:00
Timothy Stack c13e78358e [blog] add a post about xpath() TVF 2021-06-21 02:44:48 -07:00
Timothy Stack 04c4f8a779 [help] fix the example width when space is constrained 2021-06-20 21:58:45 -07:00
Timothy Stack f5b866844d [blog] add post about themes 2021-06-19 21:51:19 -07:00
Tim Stack bb35ac1471 Update CNAME 2021-06-19 12:58:39 -07:00
Timothy Stack dbcfdda363 [reltime] some more relative time fixes 2021-06-18 21:58:30 -07:00
Timothy Stack aa7ac37cdc [log_source] try to report sql filter errors 2021-06-18 09:04:53 -07:00
Timothy Stack b77367a3d3 [logs] some minor fixes
hide files on remote like with archives
fix vmw_log pattern
fix an NPE
2021-06-16 11:19:11 -07:00
Timothy Stack 02167e2caf ops 2021-06-15 21:21:36 -07:00
Timothy Stack 08ba6c0914 [docs] add favicon 2021-06-15 09:42:48 -07:00
tstack 9a8703ae7c Update tailer 2021-06-15 05:04:04 +00:00
Timothy Stack 9138251355 [tailer] set the mtime on the synced file 2021-06-14 16:20:38 -07:00
Timothy Stack 22ad9f23a9 [release] some static link cleanup 2021-06-13 22:57:22 -07:00
Timothy Stack 3041dca1ed fix links 2021-06-12 22:33:22 -07:00
Timothy Stack 488397b41c [docs] disable link check 2021-06-12 22:29:52 -07:00
Timothy Stack e07581c742 [docs] responsive grid 2021-06-12 22:07:02 -07:00
Timothy Stack a9aac1f36b [docs] more stuff for lnav.org transition 2021-06-12 18:19:06 -07:00
Tim Stack f571feaedc Create CNAME 2021-06-11 22:21:49 -07:00
Timothy Stack b9a8ac7141 [docs] config tweaks 2021-06-11 22:09:39 -07:00
Timothy Stack de86f4cce0 [docs] set baseurl 2021-06-11 22:02:13 -07:00
Timothy Stack 1d6ac461ba [docs] start to migrate lnav.org 2021-06-11 21:57:16 -07:00
Timothy Stack 4b6fb5ff18 [release] change version to v0.10.0 since there's a lot of stuff and some nits 2021-06-10 23:01:05 -07:00
tstack 0c5dc3840f Update tailer 2021-06-10 20:12:00 +00:00
Timothy Stack 131edc2823 [tailer] call out to uname utility 2021-06-10 13:11:24 -07:00
tstack 5cb6d5ea1b Update tailer 2021-06-10 19:55:30 +00:00
Timothy Stack b4e9384ac5 [tailer] backout sysctl attempt, sigh 2021-06-10 12:54:46 -07:00
Timothy Stack 1dcf92e982 [tailer] fallback to sysctl() if uname fails 2021-06-10 12:49:41 -07:00
tstack e4868d5ae2 Update tailer 2021-06-10 05:45:08 +00:00
Timothy Stack b38bd6e2fe [tailer] send the uname of the remote host back 2021-06-09 22:43:55 -07:00
tstack 796a02aa15 Update tailer 2021-06-09 22:06:06 +00:00
Timothy Stack 528f7be9d2 [tailer] don't ignore links 2021-06-09 15:05:27 -07:00
Timothy Stack 9c6715fa18 [command_executor] avoid rebuilding on interactive use 2021-06-09 09:03:35 -07:00
Timothy Stack b1adcdef36 [docs] add note about snap permissions 2021-06-08 21:37:13 -07:00
Timothy Stack 9ec58bf9af [snap] try to add ssh-keys plug 2021-06-08 19:27:44 -07:00
Timothy Stack bc76a3ee90 [snap] missing stage packages 2021-06-08 15:50:36 -07:00
Timothy Stack e1ee89fc39 [snap] add libarchive-dev 2021-06-08 15:35:25 -07:00
Timothy Stack a760a4240f [file_collection] handle dirs with colons
Fixes #863
2021-06-08 10:57:11 -07:00
Timothy Stack ace63947df [looper] increase rescan/rebuild delay when a prompt is open 2021-06-07 23:24:43 -07:00
Timothy Stack b2d296b5d3 [open] handle file names with colons
Fixes #863
2021-06-07 16:04:41 -07:00
Timothy Stack 408a2ea38e [tests] fix for busybox 2021-06-07 08:59:24 -07:00
Timothy Stack 3cc22dc88c remove leftover debug msg 2021-06-06 23:03:06 -07:00
Timothy Stack 75ead0eb60 [ui] update status on keypress and delay rescan/rebuild 2021-06-06 22:58:51 -07:00
Timothy Stack d5d44e63b3 [build] fix cmake build 2021-06-06 21:52:06 -07:00
Timothy Stack 71d1ab1a96 [statusview] fix leak in set_stitch_value() 2021-06-04 22:42:57 -07:00
Timothy Stack 516d13d772 [log_format] use DOTALL for format patterns 2021-06-03 15:59:01 -07:00
Timothy Stack 27bc9cf117 [vmw_log] format fix 2021-06-03 10:42:03 -07:00
Timothy Stack 76ce111d48 [test] fix a leak 2021-06-03 05:54:13 +00:00
Timothy Stack d3d527d290 [tests] adding some more coverage 2021-06-02 21:09:50 -07:00
Timothy Stack b5406f2cee [tests] some more coverage 2021-06-02 08:59:53 -07:00
Timothy Stack 75a01d0f50 [test] tweak test_remote.sh config 2021-06-01 23:17:09 -07:00
Timothy Stack ed93eb71c0 [remote] add some docs and allow ssh command customization 2021-06-01 22:57:32 -07:00
Timothy Stack f5ee4306db [tests] more testing of tailer 2021-05-30 22:23:45 -07:00
Timothy Stack a2e36921d5 [coverage] exclude third-party 2021-05-30 15:36:19 -07:00
Timothy Stack a87c420070 [logfile] some more notes stuff 2021-05-30 15:07:09 -07:00
Timothy Stack 8f7b08c9c5 [logfile] add notes for automatic decisions and fix compile errors
Fixes #864
2021-05-30 13:33:05 -07:00
Timothy Stack a6a411834e [lint] use enum class for logfile::rebuild_result 2021-05-29 21:46:48 -07:00
Timothy Stack 912f7939d0 [looper] minor refactor and reduce rescans 2021-05-29 14:30:20 -07:00
Timothy Stack 9c417afb2d [logfile] remove error exception and some optimizations 2021-05-28 22:53:50 -07:00
Timothy Stack 96a00f2085 [release] some tweaks 2021-05-28 13:26:31 -07:00
Timothy Stack 326fbae163 [vmw_log] some pattern fixes 2021-05-27 23:01:07 -07:00
Timothy Stack d85cae933e [build] couple of tweaks to the actions 2021-05-27 22:05:41 -07:00
Timothy Stack 46bafa1dea [remote] show progress during startup 2021-05-27 22:02:26 -07:00
Timothy Stack c0ea709dd4 [build] oops 2021-05-27 13:19:13 -07:00
Timothy Stack 8589dd253a [archive] hardening 2021-05-27 13:01:11 -07:00
Timothy Stack 0dca44f487 [rebuild] add a deadline to make the UI more responsive 2021-05-26 22:09:47 -07:00
Timothy Stack 4dfd8b2c97 [release] bump alpine version to get mallocng in musl 2021-05-26 13:10:37 -07:00
tstack 4638370f7c Update tailer 2021-05-26 17:02:16 +00:00
Timothy Stack b80e322162 [test] fix test_logfile.sh 2021-05-25 23:16:00 -07:00
Timothy Stack bce7192bee [test] fix exec 2021-05-25 22:59:57 -07:00
tstack d4fc61cbe8 Update tailer 2021-05-26 05:28:08 +00:00
Timothy Stack 1737964df6 [remote] add some tailer tests 2021-05-25 22:27:09 -07:00
tstack 5ab5d9a4f4 Update tailer 2021-05-25 05:38:18 +00:00
Timothy Stack abbc935c37 fix a typo 2021-05-24 22:37:42 -07:00
Timothy Stack 5ceb85838d [build] try custom cosmoc 2021-05-24 22:34:42 -07:00
Timothy Stack a8e7a69c49 [build] fix for backward 2021-05-24 21:58:21 -07:00
Timothy Stack 108dc1b77a [build] more stacktrace 2021-05-24 21:06:14 -07:00
Timothy Stack db5fd8e0ec [build] some more stacktrace stuff 2021-05-24 20:39:38 -07:00
Timothy Stack 8f03a441d3 [build] fix a couple of build issues 2021-05-24 11:54:27 -07:00
Timothy Stack 9231e812d7 [build] disable backward 2021-05-23 22:49:26 -07:00
Timothy Stack 399cf83fc5 [ras] add backward-cpp 2021-05-23 21:54:12 -07:00
Timothy Stack edfd835866 [remote] use the APE version of the tailer 2021-05-21 21:39:36 -07:00
Timothy Stack 8582b56c75 [news] add a comment 2021-05-21 18:20:49 -07:00
tstack 529088f911 Update tailer 2021-05-22 01:16:26 +00:00
Timothy Stack d09cffd9b4 [remote] commit the tailer 2021-05-21 18:15:35 -07:00
Timothy Stack 857ba5c8e1 [remote] try again 2021-05-21 16:25:55 -07:00
Timothy Stack 33bfc873b1 [remote] fix an issue with empty files 2021-05-21 16:16:31 -07:00
Timothy Stack 5607b1b08e [formats] handle some more vmw logs 2021-05-21 16:03:40 -07:00
Timothy Stack db1fac9def [build] missed some includes 2021-05-21 08:10:45 -07:00
Timothy Stack 93b33929a3 [build] try to fix cosmo build 2021-05-21 07:54:12 -07:00
Timothy Stack 09fdfa1034 [build] try to build tailer ape 2021-05-20 22:44:57 -07:00
Timothy Stack b78c914d6f [remote] a path is synced on an error 2021-05-20 15:48:05 -07:00
Timothy Stack 9a91cdffbb [test] scrub error message 2021-05-20 09:27:26 -07:00
Timothy Stack 12cf00f4dc [tests] set config to use for remote test 2021-05-20 09:12:51 -07:00
Timothy Stack 6ebd9f16a2 [remote] add a test 2021-05-19 22:44:32 -07:00
Timothy Stack c3dc668b69 [remote] add some config options and remove the copied tailer binary
Also fix time offset issue
2021-05-19 22:05:21 -07:00
Timothy Stack be51a4e3de [arc/remote] use a single work directory for archive/remote files 2021-05-15 22:39:18 -07:00
Timothy Stack e13816a8e3 [cmds] change :write-raw-to to copy the original log content and add :write-view-to command
Also added log_raw_text column to the log tables.

Fixes #859
2021-05-14 13:31:19 -07:00
Timothy Stack b64342ca47 [log_format] display log_body for the body field instead of the format name and add :mark-expr command 2021-05-13 22:00:26 -07:00
Timothy Stack d2b5690e0c [readline] improve filename completion 2021-05-13 19:50:04 -07:00
Timothy Stack 98677eb09a [remote] some more tweaks and add tab-completion 2021-05-11 22:37:21 -07:00
Timothy Stack 1849609e07 [remote] try to enforce protocol state 2021-05-09 21:44:31 -07:00
Timothy Stack 681f771bb7 [remote] add preview for remote :open 2021-05-09 15:01:21 -07:00
Timothy Stack 0dbe5f0f94 [logfile] increase format detection limit 2021-05-06 10:42:05 -07:00
Timothy Stack ab671d5834 [lnav_log] add a thread-local prefix for messages 2021-05-04 22:28:49 -07:00
Timothy Stack 0a0e355696 [remote] do not automatically descend into sub directories on the remote 2021-05-04 15:57:24 -07:00
Timothy Stack 6ff3badc62 [docs] start a section on remote files 2021-05-04 15:50:26 -07:00
Timothy Stack 224eb6fe55 [remote] handle closure 2021-05-03 22:50:24 -07:00
Timothy Stack 5ea22b1c0c update NEWS 2021-05-03 21:59:01 -07:00
Timothy Stack a37a859c11 [tailer] can't use realpath with some libcs 2021-05-03 12:02:04 -07:00
Timothy Stack 7f4c9868e0 [remote] add tab-completion for remote directories 2021-05-03 09:31:09 -07:00
Timothy Stack 1525a7ce98 [release] bump sqlite version 2021-05-03 09:29:39 -07:00
Timothy Stack 65dd0bfeb8 [ghc/fs] upgrade to v1.5.4 2021-05-03 09:12:56 -07:00
Timothy Stack e88e37184f [remote] add support for glob patterns 2021-05-02 22:39:18 -07:00
Timothy Stack ca5ec33241 [remote] support for links 2021-05-02 15:08:35 -07:00
Tim Stack 5aaea49b4b
Merge pull request #858 from nicolasbock/keystone_format
Add format for OpenStack Keystone log files
2021-05-01 14:20:14 -07:00
Timothy Stack c2f0919ed3 [build] fix bin2c rule 2021-05-01 08:59:47 -07:00
Timothy Stack ad6f469378 [build] add BUILT_SOURCES 2021-05-01 08:44:44 -07:00
Timothy Stack 04676d75b7 [build] missing include 2021-05-01 08:42:12 -07:00
Timothy Stack f050c7b0a7 [remote] start to wire up remote support 2021-05-01 08:33:54 -07:00
Nicolas Bock 125c872849
Add format for OpenStack Keystone log files
Keystone logs are formatted differently than the other OpenStack
service logs.

Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
2021-04-29 10:17:06 -06:00
Tim Stack 5742e5eb09
Merge pull request #857 from nicolasbock/schema
Fix schema reference
2021-04-28 13:53:19 -07:00
Nicolas Bock 97e8e6c87b
Fix schema reference
The schema should be `format` instead of `config`.

Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
2021-04-28 14:47:50 -06:00
Timothy Stack 94498878c8 [logfile_sub_source] try to avoid a full rebuild in some cases 2021-04-24 14:38:26 -07:00
Timothy Stack 2748171d2c [tailer] add an offset to the tail block 2021-04-22 12:19:49 -07:00
Timothy Stack 26751a7e2e [tailer] add option to ssh to a host 2021-04-22 19:03:42 +00:00
Timothy Stack 380969ee8d fix lib order in tailer build 2021-04-22 18:10:01 +00:00
Timothy Stack 444e7e3289 [remote] draft of the tailer 2021-04-22 09:02:24 -07:00
Timothy Stack cc1e79d1cc [init] fix order of init for views so they can be manipulated by SQL files in format dirs
Fixes #853
2021-04-17 13:58:53 -07:00
Timothy Stack 0fd7f31222 [release] add -lssh2 -lz to the static builds 2021-04-16 15:09:07 -07:00
Timothy Stack 3741985ee3 [format] allow leading slash in field names
Fixes #852
2021-04-16 14:47:47 -07:00
Timothy Stack 70c07da5c5 [sql] fix help for sparkline() 2021-04-04 21:54:54 -07:00
Timothy Stack b7817d4bb9 [build] fix musl test build 2021-04-03 22:30:45 -07:00
Timothy Stack d31aa845f5 [base] refactor duration2str 2021-04-03 14:24:24 -07:00
Timothy Stack d15c1103cf [build] bump deps and add a missing include 2021-04-02 09:28:07 -07:00
Timothy Stack 73a4df61e3 [lss] fix format string for time offset 2021-04-02 09:05:03 -07:00
Timothy Stack 0658b9ef57 [tests] move some test code around 2021-04-01 21:11:20 -07:00
Timothy Stack d183247a31 [tests] add some tests for time-ago stuff 2021-04-01 16:22:04 -07:00
Timothy Stack 32ddc76624 [time] use a 64-bit time_t in some places 2021-03-31 10:03:00 -07:00
Timothy Stack 30b4067e43 [build] unused var 2021-03-30 22:56:50 -07:00
Timothy Stack e593bde875 [build] fix some issues on xenial32 2021-03-30 22:50:10 -07:00
Timothy Stack f4c5f42e87 [docs] add some links to the Sessions section 2021-03-30 14:30:57 -07:00
Timothy Stack ef916a3fca [docs] ansi color table for themes 2021-03-30 14:12:09 -07:00
Timothy Stack 32bfd76cdb [logfile] allow max unrecognized lines to be tuned 2021-03-29 22:40:22 -07:00
Timothy Stack 2e4106b80a [build] more test/dist fixes 2021-03-29 09:35:11 -07:00
Timothy Stack bfa1877f4e [tests] try to fix test build 2021-03-28 22:42:51 -07:00
Timothy Stack 66eb3c76e6 [build] fixy 2021-03-28 22:10:42 -07:00
Timothy Stack def50ee6cf [build] try fix 2021-03-28 14:53:18 -07:00
Timothy Stack 94b3c0d467 [dbdump] remove keyword_check for now 2021-03-28 14:06:54 -07:00
Timothy Stack c0ed59e61e [sqlite] implement .dump SQL command 2021-03-28 13:50:26 -07:00
Timothy Stack 6f4791ec35 [sqlite] include generate_series() extension 2021-03-23 22:23:08 -07:00
Timothy Stack 92fd72aa97 [ci] add --disable-static 2021-03-23 16:00:17 -07:00
Timothy Stack 9b328ad5c7 [readme] some tweaks 2021-03-23 13:47:02 -07:00
Timothy Stack dd9465cd10 [readline] some fixes for match display 2021-03-23 09:35:02 -07:00
Timothy Stack 92e20ffd51 [reltime] add support for weekdays and having timeslice() return NULL when a time is out-of-range 2021-03-21 08:53:21 -07:00
Timothy Stack 0b3819d16a [config] check if XDG_CONFIG_HOME exists before using it 2021-03-20 13:54:18 -07:00
Timothy Stack 4f4d90a65d [tests] include more information in error message 2021-03-20 13:39:35 -07:00
Timothy Stack 5d4f08b1b4 [scripty] add a timeout 2021-03-19 23:12:33 -07:00
Timothy Stack 1b16376076 [build] other build fix stuff 2021-03-19 21:35:53 -07:00
Timothy Stack 3c10b1f34b [build] try to fix some tests 2021-03-19 21:29:18 -07:00
Timothy Stack 749fdacfa8 [build] fixes 2021-03-19 15:43:03 -07:00
Timothy Stack 7b0e1c4f54 [filters] fix previews when created in the editor 2021-03-18 15:59:39 -07:00
Timothy Stack 6749d6b53c [pretty-print] fix issue with rewrite
Fixes #845
2021-03-17 22:57:00 -07:00
Timothy Stack 72275aa968 [cli] require '-' to read from stdin if there are other file arguments 2021-03-07 22:09:25 -08:00
Timothy Stack def2fe4bcb [test] try to fix test 2021-03-07 14:59:22 -08:00
Timothy Stack f6128240ab [sql] add lnav_top_file() SQL function 2021-03-07 14:29:22 -08:00
Timothy Stack 68759ada2d [data_scanner] fix quoted string regex
Fixes #842
2021-03-02 15:19:08 -08:00
Timothy Stack c177a321fb [leak] try to fix leak in a test 2021-02-25 22:22:16 -08:00
Timothy Stack 5af3664bc1 [leak] fix leak in sparkline() 2021-02-25 21:59:19 -08:00
Timothy Stack d45d7d6c58 [docs] add report generation to cookbook 2021-02-25 15:47:36 -08:00
Timothy Stack 4d2691fa99 [docs] flesh out envvars a bit 2021-02-16 23:17:32 -08:00
Timothy Stack 9575f9c7d7 [view_curses] fix color pair allocation
fixes #839
2021-02-16 22:15:14 -08:00
Tim Stack bbba9ff732 Update issue templates 2021-02-16 20:46:34 -08:00
Timothy Stack c1c0036a5c [docs] mdformat arch 2021-02-15 22:55:12 -08:00
Timothy Stack 8fa4cef1b5 [docs] try to fix css_files error 2021-02-15 22:51:43 -08:00
Timothy Stack 864168ec7f [docs] set version of Sphinx 2021-02-15 22:38:26 -08:00
Tim Stack 2010dabfc2
Update README.md 2021-02-15 12:51:11 -08:00
Timothy Stack f5c72736cb [docs] some more doc text 2021-02-14 22:44:14 -08:00
Timothy Stack 0f238f7972 [docs] add some more text to arch docs and other tweaks 2021-02-13 23:08:40 -08:00
Timothy Stack 43bb384199 fix color var lookup issue 2021-02-13 15:21:57 -08:00
Timothy Stack f5e88b7158 [docs] add ARCHITECTURE.md and various other things 2021-02-13 12:41:48 -08:00
Timothy Stack fd40b55e0a [docs] some more README.md files 2021-02-07 21:30:02 -08:00
Tim Stack 995fd80751
update badges 2021-02-06 23:31:20 -08:00
Timothy Stack 2c00331040 [ci] change name 2021-02-06 23:29:43 -08:00
Timothy Stack a4368223ea some docs and test fixup 2021-02-06 23:08:01 -08:00
Timothy Stack 351ad7a8fc [xml/xpath] suggest xpath() calls for xml fields 2021-02-06 22:13:08 -08:00
Timothy Stack 6deb7032a6 [tests] add more CSIs to scripty 2021-02-05 16:04:34 -08:00
Tim Stack 0269aa1d47
Delete tui_echo.0 2021-02-04 23:28:27 -08:00
Timothy Stack 2750d23b07 [tests] add more TUI tests 2021-02-04 23:10:44 -08:00
Timothy Stack 58f1c9df1c [tests] fix tui test 2021-02-02 22:12:06 -08:00
Timothy Stack 0a701394fe [tests] add an initial TUI test 2021-02-02 21:58:42 -08:00
Timothy Stack 37523fe7d0 [test] test SQL state funcs 2021-02-01 22:51:02 -08:00
Timothy Stack 3b5a5b448a [tests] test old date 2021-02-01 22:36:31 -08:00
Timothy Stack 7e6b3dcc23 [scripty] fix handling of 'C' escape sequence 2021-02-01 21:59:46 -08:00
Timothy Stack b847ae7164 [tests] more coverage 2021-02-01 15:56:37 -08:00
Timothy Stack 7821d07b7c [tests] coverage for relative_time.hh 2021-01-31 23:20:38 -08:00
Timothy Stack 66747ef627 [ci] fix coverage job id 2021-01-31 22:53:00 -08:00
Timothy Stack 85b9329332 [tests] more coverage stuff 2021-01-31 22:43:19 -08:00
Timothy Stack f35c0c397e [tests] increasing coverage a bit 2021-01-31 21:59:48 -08:00
Timothy Stack e5a216e717 [ci] add .coveralls.yml 2021-01-31 15:28:06 -08:00
Timothy Stack caa5cc9003 [tests] add realpath() test 2021-01-31 15:01:11 -08:00
Timothy Stack 5c02766485 [tests] add test for realpath() 2021-01-31 14:41:24 -08:00
Timothy Stack 47fb48eaf3 [tests] add SQL readlink() test 2021-01-31 14:19:14 -08:00
Timothy Stack 0f81bebcb7 [ci] try to fix multiline string 2021-01-30 23:06:39 -08:00
Timothy Stack 7778042847 [tests] set TZ for test 2021-01-30 22:50:57 -08:00
Timothy Stack 805e7abaaa [ci] breakout coverage into a separate step 2021-01-30 22:29:31 -08:00
Timothy Stack c5ab97352d [cover] add some tests for :unix-time 2021-01-30 22:24:11 -08:00
Timothy Stack af9cea19e2 [ci] pass token through 2021-01-30 09:08:30 -08:00
Timothy Stack b85f9fd1d4 [build] try again 2021-01-30 00:13:09 -08:00
Timothy Stack f36954741d [build] use -fprofile-abs-path 2021-01-29 23:43:22 -08:00
Timothy Stack 83345f85c1 [build] missing coverage include 2021-01-29 22:38:09 -08:00
Timothy Stack a120bf2c0c [build] missing coverage flags 2021-01-29 22:29:06 -08:00
Timothy Stack efea67e61c [tests] move test_pcrepp 2021-01-29 22:20:42 -08:00
Timothy Stack 5c203a2648 [ci] enable debug 2021-01-29 21:56:30 -08:00
Timothy Stack b3e4b5d68d [ci] don't install coveralls 2021-01-29 21:36:49 -08:00
Timothy Stack 3566e122ae [ci] try self-hosted 2021-01-29 21:27:53 -08:00
Timothy Stack 00890970cd [tests] disable a couple of tests 2021-01-29 21:03:42 -08:00
Timothy Stack 681618a513 [ci] try again 2021-01-29 20:37:13 -08:00
Timothy Stack d5fd3410d7 [ci] reduce parallelism 2021-01-29 20:24:16 -08:00
Timothy Stack 28cd4f9ddf install lcov 2021-01-29 19:27:57 -08:00
Timothy Stack 6c864696da try to turn on coveralls 2021-01-29 19:19:01 -08:00
Timothy Stack fa7f8cf3a7 [docs] some more cookbook text 2021-01-29 18:51:37 -08:00
Timothy Stack 49ebde5953 [build] remove pcrecpp and other stuff
Linking against a binary c++ lib suuuucckkkkkssss...
2021-01-29 11:12:02 -08:00
Timothy Stack 2b9f4c6d3a [docs] start a cookbook 2021-01-24 21:49:06 -08:00
Timothy Stack b5af750256 [docs] some doc updates 2021-01-24 14:35:14 -08:00
Timothy Stack 099b32b393 [version] bump to 0.9.1 2021-01-24 13:16:28 -08:00
Timothy Stack f17d838be1 [build] missing file in header list 2021-01-23 14:26:02 -08:00
Timothy Stack 215c08f632 [build] missed curl_looper subclassing isc::service 2021-01-23 14:18:22 -08:00
Timothy Stack 50b63559ce [build] need a cast... 2021-01-23 13:54:07 -08:00
Timothy Stack 775d2443a6 [injector] fix some init issues 2021-01-23 13:36:22 -08:00
Timothy Stack 310c67c53e [build] missing include 2021-01-23 13:14:47 -08:00
Timothy Stack bc48911e42 [build] missing include 2021-01-23 13:11:47 -08:00
Timothy Stack eea5220191 [build] missing include 2021-01-23 13:04:48 -08:00
Timothy Stack cac1175973 [services] initial pass at injecting services and a bunch of other stuff 2021-01-23 13:00:51 -08:00
Timothy Stack 8633afdff3 [ptime] fix handling of too large number for seconds 2021-01-19 22:54:43 -08:00
Timothy Stack 92a31534cf [vt52] deal with bracketed paste mode from readline 2021-01-19 21:49:43 -08:00
Timothy Stack e5f37ee3ff [perf]
Defect Number:
    Reviewed By:
   Testing Done:
2021-01-19 10:05:56 -08:00
Timothy Stack a871ad5dbc [cleanup] some curl-related fixes 2021-01-18 15:04:24 -08:00
Timothy Stack 076d730fa2 [cleanup] some minor fixes 2021-01-17 23:29:08 -08:00
Timothy Stack 56bee6f4c9 [archive] remove old unpacked archives and a bunch of other stuff 2021-01-16 22:23:20 -08:00
Timothy Stack ae422bb37e [release] add xz/lzma to the release build 2021-01-11 21:33:28 -08:00
Timothy Stack a768f0146f add CPPFLAGS/LDFLAGS to bin2c build 2021-01-11 20:40:11 -08:00
Timothy Stack 8851c4492f [tests] add a test for decompression 2021-01-10 22:04:55 -08:00
Timothy Stack 678be94d75 [files] use libarchive to decompress files
Fixes #87
2021-01-10 13:33:20 -08:00
Timothy Stack be71834733 [files-view] close the files view when jumping to a file 2021-01-09 22:00:37 -08:00
Timothy Stack 5599c9cc80 [files] fix hiding of duplicate files 2021-01-08 22:42:28 -08:00
Timothy Stack 6be36eda19 [build] isdigit() instead of isnumber() 2021-01-08 20:48:54 -08:00
Timothy Stack 8235f9af5d [tests] try to make scripty output readable 2021-01-08 14:08:52 -08:00
Timothy Stack 4d936f7bba [build] add more tests to cmake build 2021-01-01 20:40:52 -08:00
Timothy Stack 853ef11435 [debt] another leak fix 2020-12-31 23:58:23 -08:00
Timothy Stack 7f80d47ae4 [debt] fix some cleanup 2020-12-31 23:39:33 -08:00
Timothy Stack cc072d29ea [tests] update another date-sensitive test 2020-12-31 23:26:57 -08:00
Timothy Stack 60dde499ac [tests] fix test to make it insensitive to the current date 2020-12-31 23:23:56 -08:00
Timothy Stack 1cefe583fa [debt] fix a leak in lnav_view_filters 2020-12-31 22:55:34 -08:00
Timothy Stack 2de57d242d [leak] fix leak of yajl error msgs 2020-12-31 15:24:28 -08:00
Timothy Stack 6d8a9f2121 [debt] try to fix leak 2020-12-31 14:58:37 -08:00
Timothy Stack 2996a90afa [format] use the module level for a message 2020-12-31 13:55:53 -08:00
Tim Stack 787b33f45c
[build] missing include 2020-12-30 15:04:32 -08:00
Timothy Stack 1d17ac7f29 [build] compress data files embedded in the binary to save some space
Fixes #763
2020-12-30 13:49:29 -08:00
Timothy Stack 63c31838eb [debt] fixing some more debt 2020-12-28 22:31:11 -08:00
Tim Stack f5f1626b07
Update README.md 2020-12-27 21:20:58 -08:00
Timothy Stack 9a073e80e7 [result] fix Result.map() issue with copying the value when the result was in error 2020-12-26 23:00:44 -08:00
Timothy Stack 7476dd5bb9 [misc] misc bugs 2020-12-24 22:29:38 -08:00
Timothy Stack bfa2c7f38c [lnav] fix handling of closed files 2020-12-24 00:07:53 -08:00
Tim Stack a13ad5b7c2
Merge pull request #817 from eladeyal-intel/patch-1
reorder
2020-12-23 22:49:37 -08:00
Timothy Stack 4ca6fd7bfd [sqlite] add an xml/xpath extension 2020-12-23 15:01:21 -08:00
eladeyal-intel f41d5cc414
reorder 2020-12-23 08:58:44 +02:00
Timothy Stack 9ed3a80326 [build] minor fixes 2020-12-18 22:46:16 -08:00
Timothy Stack 4ff2b710d5 [log_format] change w3c_log to put extra columns into a JSON column 2020-12-18 22:35:23 -08:00
Tim Stack a9a08d3315
Merge pull request #812 from phord/gz-stream-continuation
gzip stream continuation
2020-12-14 12:04:52 -08:00
Timothy Stack 941504a4cb [help] fix word wrap for example desc 2020-12-13 21:11:07 -08:00
Phil Hord 7ad40f7263 Improved fix for multi-stream gz files
Instead of throwing an error when we unexpectedly reach a stream EOS, treat it as regular
stream end. This allows for streams that might different encodings for different sections.
Even though we don't recognize the encoding and continue on with the data, at least we
don't fail when we reach this situation.  This allows us safely to try and continue
parsing the next catted gz stream, knowing that if it fails, we will handle it gracefully.
2020-12-13 13:37:12 -08:00
Phil Hord f10a303f54 Revert "Don't try to read concatenated gzip streams"
This reverts commit 1d127053e9.
2020-12-13 13:17:21 -08:00
Timothy Stack 3a11140b27 [humanize] handle a zero value explicitly since log() doesn't like it (doh...) 2020-12-12 23:02:24 -08:00
Timothy Stack e6df0fba0a [humanize] something seems wrong 2020-12-12 22:33:58 -08:00
Timothy Stack e04d04c1a9 [build] search for tinfow in addition to tinfo
Hopefully fixes #792 without breaking other things...
2020-12-10 22:50:42 -08:00
Timothy Stack 6b0b3a65dd [build] fix static init issue 2020-12-10 22:32:01 -08:00
Timothy Stack 127fb20b28 [build] try to dump error log 2020-12-10 21:42:44 -08:00
Timothy Stack 04da95eb95 [installer] fix file type check for formats
Fixes #801
2020-12-10 21:18:56 -08:00
Timothy Stack 9c1f2ca4fa [view_curses] use VC_ROLE instead of VC_STYLE where possible and fix segv in mvwattrline
Fixes #806
2020-12-09 15:35:06 -08:00
Timothy Stack 159608cdcc [debt] some more leaks 2020-12-08 23:02:10 -08:00
Timothy Stack 730233e356 [debt] some more leak plugging
Defect Number:
    Reviewed By:
   Testing Done:
2020-12-08 15:56:01 -08:00
Timothy Stack 9d6941c89d [readline] show help for SQL in :filter-expr 2020-12-08 13:24:29 -08:00
Timothy Stack 8a2fb80888 [build] fix distcheck 2020-12-08 09:29:52 -08:00
Timothy Stack 267e32d479 [tests] update expected output 2020-12-08 09:11:39 -08:00
Timothy Stack e3f28eaa43 [logfile] a captured file cannot be overwritten
Fixes #741
2020-12-07 15:21:33 -08:00
Tim Stack 560c2d4ec3
Delete .travis.yml 2020-12-07 11:53:30 -08:00
Timothy Stack 030c73e76b [build] missing include 2020-12-07 09:12:45 -08:00
Timothy Stack 642fce3548 [build] minor fixes 2020-12-07 09:04:14 -08:00
Timothy Stack 836fc83203 [pretty-print] pay attention to hidden fields
Fixes #653
2020-12-06 23:52:09 -08:00
Timothy Stack a0986bf271 [log_formats] ignore empty lines in non-multiline formats 2020-12-06 13:09:06 -08:00
Timothy Stack 623da1fe33 [build] add w3c logfiles to dist 2020-12-05 23:33:17 -08:00
Timothy Stack 5f1ffb24a8 [build] name clash 2020-12-05 23:17:15 -08:00
Timothy Stack 32f112b8de [formats] add w3c extended log format impl
Fiexes #798
2020-12-05 21:51:46 -08:00
Timothy Stack 8494aefd50 fix leak in pcrepp copy cons 2020-12-01 14:00:28 -08:00
Timothy Stack 86d515b4bc clear db_label_source 2020-12-01 13:48:13 -08:00
Timothy Stack d773fe0b9a make sure destructors are run for vtab 2020-12-01 13:33:04 -08:00
Timothy Stack 6b630f55dd unregister vtabs 2020-12-01 12:58:37 -08:00
Timothy Stack 19e0624ab6 [debt] even more mem leaks
Defect Number:
    Reviewed By:
   Testing Done:
2020-12-01 11:27:03 -08:00
Timothy Stack 21f127cb56 [debt] some more mem leaks
Defect Number:
    Reviewed By:
   Testing Done:
2020-12-01 10:28:20 -08:00
Timothy Stack b924395ed2 [debt] fix some mem leaks 2020-11-30 23:42:37 -08:00
Timothy Stack 0d31323a18 [build] missing sqlite func 2020-11-30 23:07:02 -08:00
Timothy Stack 33621e1936 [filters] more space for hit count in the UI 2020-11-30 23:06:05 -08:00
Timothy Stack 3a2a1e0dda [sqlite] fallback to prepare_v2 2020-11-29 20:44:20 -08:00
Timothy Stack 08739e4235 [sql_filter] fix statement finalization 2020-11-29 20:35:13 -08:00
Timothy Stack 927aecc437 [sqlite] fix mprintf free funcs 2020-11-29 13:58:53 -08:00
Timothy Stack 3c0dbf3324 [rl-poss] fix free of sqlite3_mprintf 2020-11-29 13:46:47 -08:00
Timothy Stack 900834f7c8 [build] missing algo inc 2020-11-29 13:37:01 -08:00
Timothy Stack 49a6f6df11 [build] missing algo inc 2020-11-29 13:35:15 -08:00
Timothy Stack 22a7e4deeb [build] missing capture 2020-11-29 13:33:32 -08:00
Timothy Stack 22c2e95df0 [filters] sql filter
Related to #568
2020-11-29 13:20:07 -08:00
Timothy Stack 6d0054d3b6 [logfile] refactor visibility 2020-11-25 14:47:39 -08:00
Timothy Stack 2aad7985a6 [build] opt build
Defect Number:
    Reviewed By:
   Testing Done:
2020-11-25 14:46:39 -08:00
Tim Stack ba26c79508
Merge pull request #796 from nicolasbock/tmux
Add `tmux` terminfo entries
2020-11-25 14:45:39 -08:00
Nicolas Bock 5be45cf397
Add `tmux` terminfo entries
Recent terminfo databases contain two entries for tmux sessions,
`tmux` and `tmux-256color`. This change adds these two entries.

Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
2020-11-25 15:29:08 -07:00
Timothy Stack d3fa76e8e9 [lnav_util] fix ok/error msg rendering 2020-11-20 08:55:30 -08:00
Timothy Stack a29d3bc745 [build] missing algo 2020-11-19 22:35:40 -08:00
Timothy Stack 0e9962f187 [build] missing math 2020-11-19 22:31:26 -08:00
Tim Stack 8dbb60215e
Update data_parser.cc 2020-11-19 22:12:04 -08:00
Timothy Stack 9a431f5354 [build] missing vec 2020-11-19 21:50:54 -08:00
Timothy Stack 1e1d12bd0b [build] missing <algorithm> 2020-11-19 21:46:25 -08:00
Timothy Stack fa9a66152f [build] missing include 2020-11-19 21:43:58 -08:00
Timothy Stack 8e629b166a [build] some more compiler profiling
Defect Number:
    Reviewed By:
   Testing Done:
2020-11-19 21:36:51 -08:00
Timothy Stack 6fe2f552d5 [build] missing header files for distcheck 2020-11-17 10:54:56 -08:00
Timothy Stack d6055d178b [build] move method from .hh file into .cc 2020-11-17 10:46:12 -08:00
Timothy Stack 5bffcb4c3e [build] missing include again... 2020-11-17 10:31:26 -08:00
Timothy Stack d1a84b3606 [build] missing include 2020-11-17 10:28:35 -08:00
Timothy Stack 51d1204a96 [arc] add content hash to archive temp dir and tech debt 2020-11-17 10:04:23 -08:00
Timothy Stack 0765c07010 [view] migrate view_action stuff to function objects 2020-11-14 21:39:12 -08:00
Timothy Stack b1a0227cbd [build] try to fix travis build 2020-11-12 22:45:51 -08:00
Timothy Stack 9d87cfa2f0 [debt] more tech debt 2020-11-12 21:58:40 -08:00
Timothy Stack cb7a8904c1 [build] missed header in the makefile 2020-11-09 23:11:49 -08:00
Timothy Stack 9eee6b2b64 [build] missing header 2020-11-09 23:02:08 -08:00
Timothy Stack f192cb7c3e [input_dispatcher] fix handling of unicode input
Fixes #791
2020-11-09 22:18:17 -08:00
Timothy Stack db8a3c4d38 [debt] doing some cleanup
Defect Number:
    Reviewed By:
   Testing Done:
2020-11-09 22:17:17 -08:00
Timothy Stack 21e78670e2 [highlighter] fix a mistake in the offset used for semantic highlights 2020-11-05 16:07:35 -08:00
Timothy Stack 00dcd86f79 [view_curses] always apply utf adjustments in mvwattrline
doh

Fixes #786
2020-11-04 10:50:37 -08:00
Timothy Stack 78d5954fd7 [build] fix conversion 2020-11-01 06:23:57 -08:00
Timothy Stack 5c73ce0a85 [build] fix noarchive build 2020-10-31 23:12:40 -07:00
Timothy Stack e4ea9ca584 [arc] report errors when opening archives 2020-10-31 22:19:41 -07:00
Timothy Stack 563fa94d39 [log] fix fill character for file name prefix 2020-10-29 15:33:15 -07:00
Timothy Stack 8433a67c68 [release] fix musl build wrt libarchive 2020-10-29 14:34:47 -07:00
Timothy Stack 9bfe1f8319 [cmds] include filename in copied log lines when shown
Fixes #789
2020-10-28 22:56:58 -07:00
Timothy Stack df3df8369c [session] stages 2020-10-28 21:24:23 -07:00
Timothy Stack 5e42b4cb8a [debt] include cleanup 2020-10-28 21:23:46 -07:00
Timothy Stack 0dff822ade [debt] remove pthreadpp.hh 2020-10-28 21:23:41 -07:00
Timothy Stack 56866d8a33 [config-ui] support for searching 2020-10-28 21:23:34 -07:00
Timothy Stack 8b38bb0970 [session] store file visibility 2020-10-28 21:23:25 -07:00
Timothy Stack c22c78220c [text] hide text files 2020-10-28 21:23:16 -07:00
Timothy Stack 7b77a612c2 [files] make file scanning async 2020-10-28 21:22:56 -07:00
Timothy Stack dfd18a4be5 [view] add files view 2020-10-28 21:21:57 -07:00
Timothy Stack 4b7244d06c [archive] add locking 2020-10-28 21:20:57 -07:00
Timothy Stack a63cf003a0 [themes] move highlights to theme definitions
Fixes #783
2020-10-28 21:19:57 -07:00
Timothy Stack 3b0168025d [cmds] add support for hiding files 2020-10-28 21:18:57 -07:00
Timothy Stack 579e4274f9 [files] initial impl for opening archives 2020-10-28 21:17:57 -07:00
Timothy Stack 9f524136bd [fs] remove old filesystem impl 2020-10-20 22:55:46 -07:00
Timothy Stack e7f5bf3a6a [3rd-party] import ghc/filesystem 2020-10-20 22:54:59 -07:00
Timothy Stack 59665368ee [autoconf] check for libarchive 2020-10-20 22:53:59 -07:00
Tim Stack 4b30dffd6b
Merge pull request #785 from phord/gzip-eos
Don't try to read concatenated gzip streams
2020-10-20 09:29:54 -07:00
Phil Hord 1d127053e9 Don't try to read concatenated gzip streams
Don't try to continue reading the next stream of a concatenated
gzip file.  The next stream may be CRC noise or other garbage.

Maybe in the future we should look for a gzip header in the
following bytes of the stream and try to decode from there.
But it's not clear that anyone ever uses this supposed gzip
feature anyway.

Let's just end the stream when we reach EOS. Also, if the
stream fails to init, let's leave it closed instead of throwing
an error no one is likely to catch.  Log the error msg from
zlib if one is provided.
2020-10-19 20:49:36 -07:00
Timothy Stack 2a7db9b257 [root-config] default /ui/default-colors to true 2020-10-07 21:32:29 -07:00
Timothy Stack d8a083f0fe [filters] add :toggle-filtering command 2020-10-02 21:17:52 -07:00
Timothy Stack b44b6d24cf [themes] use an empty string to get the terminal default background instead of specifying black
Defect Number:
    Reviewed By:
   Testing Done:
2020-10-02 14:05:27 -07:00
Timothy Stack 276f71423e [readline] add alternate enter command 2020-09-30 21:55:37 -07:00
Tim Stack cc6ae5ee2e
Update format2csv.py 2020-09-29 14:14:43 -07:00
Tim Stack 7c215f09c6
Merge pull request #777 from sureshsundriyal/master
[musl] Remove the unnecessary 'queue.h' dependency
2020-09-27 11:05:30 -07:00
Suresh Sundriyal cac46e9848 [musl] Remove the unnecessary 'queue.h' dependency 2020-09-27 08:45:52 -07:00
Tim Stack e539aca4ea
Merge pull request #776 from sureshsundriyal/master
Add explicit dependencies and remove BUILT_SOURCES target.
2020-09-25 20:16:05 -07:00
Suresh Sundriyal 3a9967cbf5 [build] Get rid of BUILT_SOURCES 2020-09-24 19:17:36 -07:00
Suresh Sundriyal cc6f0a06dd [build] Add some explicit dependencies.
This should fix the individual make targets.
2020-09-24 19:17:36 -07:00
Timothy Stack 0e1eb418c8 [cmake] set a default for the build type 2020-09-24 16:09:28 -07:00
Timothy Stack 8f0c918bb3 [build] fix the hunter config, the LOCAL flag was missing 2020-09-24 16:02:14 -07:00
Timothy Stack 5e01902c60 [travis] disable arm build for now 2020-09-24 14:52:06 -07:00
Timothy Stack 2cd0ee7200 [build] try to fix arm64 travis build 2020-09-24 14:31:40 -07:00
Timothy Stack 15f38ce6ba [travis] try to activate arm builds 2020-09-24 14:25:34 -07:00
Timothy Stack 74bfa21050 [build] missed a file 2020-09-24 13:22:42 -07:00
Timothy Stack 65c991919b [loader] fix format loader and add $schema refs to formats 2020-09-24 13:12:43 -07:00
Timothy Stack 7763d2db7a [cross] try to fix armhf
Defect Number:
    Reviewed By:
   Testing Done:
2020-09-24 09:40:56 -07:00
Timothy Stack 6ec90c521b [build] dump crash log during build 2020-09-24 08:58:20 -07:00
Timothy Stack e04d49bc98 fix a memory error in extension-functions.cc 2020-09-24 06:49:38 -07:00
Timothy Stack ec920a771f [snap] nope... 2020-09-23 23:35:13 -07:00
Timothy Stack 0b1b57debb [snap] bump base version to core20 2020-09-23 23:18:29 -07:00
Timothy Stack 267ca92025 [snap] add missing lib 2020-09-23 22:51:29 -07:00
Timothy Stack c3646be987 [build] fix some issues on 32-bit arch 2020-09-23 22:36:47 -07:00
Timothy Stack a4e6328ff7 [snap] force snapshot 2020-09-23 19:29:30 -07:00
Tim Stack 0bfb11fcc8
Update snapcraft.yaml 2020-09-23 18:35:04 -07:00
Timothy Stack cb58f3d1ae [snap] add debug 2020-09-23 17:49:57 -07:00
Tim Stack 4434e9f2aa
Merge pull request #775 from sureshsundriyal/master
[dist] Some more distribution related cleanup.
2020-09-23 17:48:08 -07:00
Suresh Sundriyal f8e990cf76 [dist] Some more distribution related cleanup.
Remove init-sql.h from the distributed package and remove the redundant
files from DISTCLEAN.
2020-09-23 16:20:11 -07:00
Tim Stack 65b999c5ca
Merge pull request #774 from sureshsundriyal/master
[dist] Stop packaging builtin-scripts.h
2020-09-23 15:18:51 -07:00
Timothy Stack dd2fb1d0c5 [snap] remove curl dep 2020-09-23 15:05:43 -07:00
Suresh Sundriyal 8b2bcca752 [dist] Stop packaging builtin-scripts.h 2020-09-23 14:57:17 -07:00
Timothy Stack 47c8a32481 [snap] remove source-tag 2020-09-23 14:54:10 -07:00
Timothy Stack 82c7b236ee [readme] add snap link 2020-09-23 14:51:11 -07:00
Timothy Stack b1e89be4c3 [snap] try to build latest 2020-09-23 14:47:44 -07:00
Timothy Stack 6cbc888786 [snap] update snapcraft.yaml 2020-09-23 14:15:48 -07:00
Timothy Stack b2d5a41762 [NEWS] some cleanup of the text 2020-09-23 14:03:20 -07:00
Tim Stack 20c6ec3166
Merge pull request #773 from sureshsundriyal/master
[build] Get rid of configure errors
2020-09-22 18:21:29 -07:00
Suresh Sundriyal 091f3c04b4 [build] Get rid of configure errors 2020-09-22 17:23:51 -07:00
Timothy Stack f39a208472 [cmake] ptimec doesn't belong in libdiag 2020-09-22 14:38:24 -07:00
Timothy Stack f43d05a49a [build] more dist fixes 2020-09-22 14:31:27 -07:00
Tim Stack d570a86232
Merge pull request #772 from sureshsundriyal/master
[dist] Prevent distributing built sources
2020-09-22 14:05:01 -07:00
Suresh Sundriyal 63ed3ee677 [dist] Prevent distributing built sources 2020-09-22 13:50:37 -07:00
Timothy Stack a5171058c7 [build] some built files were being included in the dist 2020-09-22 12:01:13 -07:00
Timothy Stack d8bc5b71c8 [cmake] bump hunter gate version 2020-09-21 23:33:27 -07:00
Timothy Stack 8ff80ceff0 [lnav_log] shorten file name to the base name 2020-09-21 07:25:40 -07:00
Tim Stack d58ce0cc90
Merge pull request #769 from sureshsundriyal/freebsd
[freebsd] Remove basename from log_msg.cc and update the FreeBSD image in the VagrantFile.
2020-09-21 07:10:16 -07:00
Timothy Stack 48d4b51fd7 [view_curses] fix mvwattrline for utf chars
Fixes #675
2020-09-21 06:53:05 -07:00
Suresh Sundriyal 46e97f67df [freebsd] Update the vagrant box
Also update the boot_time since the newer version of FreeBSD image seems
to take a lot longer to come up.
2020-09-20 23:27:22 -07:00
Suresh Sundriyal 70847429fa [freebsd] Remove the use of basename from log_msg.
Fix
2020-09-20 23:27:22 -07:00
Tim Stack 49ae32a986
Merge pull request #770 from sureshsundriyal/master
[cross-compile] Use 'BUILD_EXEEXT' as the suffix for build binaries.
2020-09-20 22:15:08 -07:00
Suresh Sundriyal 2062a0c740 [cross-compile] Use 'BUILD_EXEEXT' as the suffix for build binaries.
Some compilers automatically append the system binary suffix. If lnav is
cross compiled on such systems; then we should be using this suffix for
the binaries that are built and run as part of the build process.
2020-09-20 20:50:47 -07:00
Tim Stack 89cb6fbe76
Merge pull request #768 from sureshsundriyal/master
Miscellaneous fixes.
2020-09-20 20:38:59 -07:00
Suresh Sundriyal a6920cc320 [AUTHORS] Update the file. 2020-09-19 16:22:30 -07:00
Suresh Sundriyal f35f855458 [tests] Remove use of deprecated std::random_shuffle 2020-09-19 15:10:28 -07:00
Suresh Sundriyal bc0dc337ef [cross-compiling] Disable document generation during cross-compilation
Document generation requires exec'ing lnav which might not be possible
while cross-compiling.
2020-09-19 14:39:24 -07:00
Timothy Stack 37b9b346a9 [logger] fix for queue.h removal change 2020-09-19 14:17:22 -07:00
Timothy Stack 99805c61bb [build] missing include 2020-09-19 13:04:21 -07:00
Timothy Stack e8e89ad0fd [build] remove queue.h refs 2020-09-19 12:34:44 -07:00
Tim Stack 5b7e5a7513
Merge pull request #767 from sureshsundriyal/fix-ci
[cirrus/ci] Use a recent FreeBSD image
2020-09-19 12:33:44 -07:00
Tim Stack 8fe8654d23
Merge pull request #766 from sureshsundriyal/master
[cross-compile] Allow build artifacts to be built with build compilers.
2020-09-19 12:32:50 -07:00
Suresh Sundriyal a14d47ae76 [cirrus/ci] Use a recent FreeBSD image 2020-09-18 16:38:10 -07:00
Suresh Sundriyal bc09aad96c Undo changes to cmd-ref.rst 2020-09-18 12:32:36 -07:00
Suresh Sundriyal 4946f79ec1 [ptimec] Rename ptimec.cc -> ptimec.c 2020-09-18 12:20:40 -07:00
Suresh Sundriyal 57e0b9f3f3 [cross-compiling] Fix distcheck target 2020-09-18 11:44:06 -07:00
Suresh Sundriyal d118a60a36 [cross-compile] Allow build artifacts to be built with build compilers.
While cross-compiling; bin2c and ptimec need to run during build on the
build-host. Currently; the host compiler is picked and the generated
binaries cannont be exec'ed causing the build to fail.

The change fixes the bin2c and ptimec compilation units to use the
build host compatible compiler.
2020-09-18 10:03:12 -07:00
Timothy Stack ba4b31b24a remove noisy debug log 2020-09-18 09:41:35 -07:00
Timothy Stack 7d886a4e29 Merge branch 'sureshsundriyal-master' 2020-09-18 09:01:07 -07:00
Timothy Stack e6c8f49c29 Merge branch 'master' of https://github.com/sureshsundriyal/lnav into sureshsundriyal-master 2020-09-18 09:00:57 -07:00
Timothy Stack cfc285ce2d [release] fix bzip2 URL and fail download-pkgs if a package fails to download 2020-09-18 08:57:29 -07:00
Suresh Sundriyal 8646204c5d [simd] fix the config check for enable_simd 2020-09-18 05:54:08 -07:00
Suresh Sundriyal 24b964c65d [release] Update bzip2 download URL 2020-09-18 04:39:51 -07:00
Suresh Sundriyal 0dedb3d455 [simd] Allow toggling of simd related functionality 2020-09-17 21:20:52 -07:00
Timothy Stack cc12e6359c [release] do not upgrade virtualbox additions on musl 2020-09-17 09:11:23 -07:00
Timothy Stack da772a6486 [build] try to fix distclean issue 2020-09-16 23:14:05 -07:00
Timothy Stack 4bf048d974 [autoconf] check for -static-libstdc++ flag 2020-09-16 22:58:42 -07:00
Timothy Stack f1a47ac1ad [log_format] make logline_value slightly less error-prone 2020-09-16 21:46:44 -07:00
Timothy Stack 90ab6ea8f1 [bro-log] fix an issue with the logline_values in the bro log format 2020-09-16 14:38:58 -07:00
Timothy Stack ee572a2c86 [init] fix an issue with input not being taken when an empty file is loaded 2020-09-16 14:05:56 -07:00
Tim Stack c724a44bf4
Update README.md
link to the read-the-docs site
2020-09-15 21:38:30 -07:00
Timothy Stack dbe252c70c [docs] some more doc stuff 2020-09-15 15:45:29 -07:00
Timothy Stack bbf06e78ba [init] delay initial command execution until some files are loaded
Fixes #764
2020-09-15 15:44:29 -07:00
Timothy Stack cc7cba6514 [search] start searching a couple thousand lines before the top 2020-09-14 21:29:06 -07:00
Timothy Stack c18850aa01 [release] add musl-package to the "release" deps 2020-09-14 13:29:52 -07:00
Tim Stack 648b78359a
Merge pull request #762 from sureshsundriyal/master
[release] Build target for static lnav compiled with musl-libc.
2020-09-14 13:01:53 -07:00
Suresh Sundriyal 271c961085 [release] Build target for static lnav compiled with musl.
`musl-package` compiles a completely static `lnav` binary compiled with
musl-libc.
2020-09-14 06:34:45 -07:00
Timothy Stack be106fcb8d [docs] add some more keymap/theme docs 2020-09-13 23:03:23 -07:00
Timothy Stack 692cf37e1b [NEWS] mention keymap support 2020-09-12 21:23:26 -07:00
Timothy Stack 5e1f43b4c7 [readline] refine tab-completion for config options 2020-09-12 21:02:20 -07:00
Timothy Stack 9773efd3a5 [keymap] add german keymap 2020-09-12 14:06:23 -07:00
Timothy Stack ce0383dee1 [build] fix some warnings 2020-09-11 23:10:11 -07:00
Tim Stack c3f7eac29d
Merge pull request #760 from sureshsundriyal/master
Minor changes to quell some compiler warnings and other miscellaneous changes.
2020-09-11 21:28:01 -07:00
Suresh Sundriyal 9a49035ce6 [Format] Designate non-capturing group 2020-09-11 21:07:03 -07:00
Suresh Sundriyal 7494f5cef5 Optimize the vum-log4cpp expression 2020-09-11 19:52:24 -07:00
Suresh Sundriyal 9b2b9d50ba Remove unused header 2020-09-11 15:30:55 -07:00
Suresh Sundriyal 908c41cb64 Fix compiler warnings about unused variables. 2020-09-11 15:30:55 -07:00
Suresh Sundriyal 1b5fa6d92d Fixup AUTHORS 2020-09-11 15:20:23 -07:00
Tim Stack 94e09c5228
Merge pull request #759 from sureshsundriyal/master
[Format] Add updatemgr's log4cpp format to vmw_log format.
2020-09-11 14:05:32 -07:00
Suresh Sundriyal a24aa5e414 [Format] Make the levels regex case-insensitive. 2020-09-11 13:00:19 -07:00
Suresh Sundriyal 83a3e69118 [Format] Fix up the greedy match 2020-09-11 12:53:12 -07:00
Suresh Sundriyal 2d30bfd322 [Format] Add updatemgr's log4cpp format to vmw_log format. 2020-09-11 12:18:52 -07:00
Timothy Stack 16c5fdccb4 [build] more win build 2020-09-10 22:15:02 -07:00
Timothy Stack 783c23b62c [build] add disable flag for system path inclusion 2020-09-10 22:09:29 -07:00
Tim Stack 0fa78a3c9f
Merge pull request #755 from amosbird/patch-1
Don't force system library path
2020-09-10 21:48:23 -07:00
Timothy Stack f9b3884b5e [build] try to fix win build 2020-09-10 21:45:42 -07:00
Timothy Stack 349991a695 [shlex] fix handling of tilde 2020-09-10 21:19:23 -07:00
Timothy Stack 3692c76788 [build] fix uninit var warning 2020-09-10 11:23:17 -07:00
Amos Bird 73d41228a9
Don't force system library path
When building with non-root toolchains (gentoo-prefix for instance), it confuses the toolchain to use non-existing libraries.
2020-09-11 02:16:08 +08:00
Timothy Stack f383af4d5f [build] try to fix RTD build 2020-09-09 22:54:05 -07:00
Timothy Stack f3d172c831 [keymap] add a french keymap 2020-09-09 22:16:06 -07:00
Tim Stack 3438ad1da9
Merge pull request #757 from sureshsundriyal/master
Update AUTHORS
2020-09-09 15:03:02 -07:00
Suresh Sundriyal fb51c2fd4a Update AUTHORS 2020-09-09 13:50:44 -07:00
Timothy Stack a3264fb104 [log_format] fix issues with year rollover
Defect Number:
    Reviewed By:
   Testing Done:
2020-09-08 22:11:32 -07:00
Timothy Stack 8a3fbe6375 [cmds] fix error format strings 2020-09-08 09:26:42 -07:00
Timothy Stack 815a05577e [keymap] suggest the config option to set for an unknown keystroke
Also, add a unicode green-check/red-X mark for the success/error
message for commands.
2020-09-05 14:41:05 -07:00
Timothy Stack 8734795505 [keymap] handle unicode keys and add UK keymap
Fixes #392
2020-09-04 14:39:04 -07:00
Timothy Stack ba1bc28209 [build] fix issues with test files 2020-09-03 22:13:21 -07:00
Timothy Stack 82b34bb02a [config] remove :save-config 2020-09-03 14:09:35 -07:00
Timothy Stack ead1d3eb36 [build] fix some more warnings 2020-09-02 23:04:21 -07:00
Timothy Stack c5a82240ec [build] try to fix some warnings 2020-09-02 22:36:26 -07:00
Timothy Stack 84a7079e3f [main] capture stderr only after initscr() and fix curl configure detection 2020-09-02 15:39:27 -07:00
Timothy Stack d6e1fd1f32 [release] change version to 0.9.0 2020-09-01 22:36:47 -07:00
Timothy Stack 0aa31964aa Revert "[autoconf] check for ncursesw instead of just ncurses"
This reverts commit 9b751940ae.
2020-09-01 15:27:52 -07:00
Timothy Stack a9dda41baf [release] add fallback terminfos to the ncurses static build
Fixes #751
2020-09-01 09:41:29 -07:00
Timothy Stack f0934a6e3c [theme] fix background color in the default theme 2020-08-30 22:48:07 -07:00
Timothy Stack 0940e97b2b [nits] fix some naming issues
Fixes #169
2020-08-30 22:13:56 -07:00
Timothy Stack 9b751940ae [autoconf] check for ncursesw instead of just ncurses
Fixes #479
2020-08-30 21:26:12 -07:00
Timothy Stack eb88ec4f6c [release] some more release fixes 2020-08-28 22:04:53 -07:00
Timothy Stack 1f2cf13739 [text] highlight rust code 2020-08-27 22:24:46 -07:00
Timothy Stack b408740697 [release] fix some issues in the release process 2020-08-27 22:00:03 -07:00
Timothy Stack 6182b6b41c [mouse] do not require xterm for mouse use
Fixes #727
2020-08-27 14:13:43 -07:00
Timothy Stack 4fa4a7057b [log_format] gracefully handle a misconfigured log format
Fixes #742
2020-08-27 13:42:10 -07:00
Timothy Stack d0f2f9e800 [view_curses] fix attribute range when the line contains UTF-8 chars
Fixes #745
2020-08-27 13:42:05 -07:00
Timothy Stack 164477a5fe [build] update apt cache 2020-08-26 22:58:05 -07:00
Timothy Stack a2b3427502 [tests] add tests for SQL annotation functionality 2020-08-26 22:44:12 -07:00
Timothy Stack 1269654617 fix SQL prompt help lookup
Fixes #748
2020-08-25 16:27:22 -07:00
Timothy Stack e451c7c112 [docs] more usage notes
Defect Number:
    Reviewed By:
   Testing Done:
2020-08-24 22:50:48 -07:00
Timothy Stack d695febe14 [cmd] add :write-jsonlines-to command 2020-08-21 23:18:51 -07:00
Timothy Stack 2a37a9ce7f [build] fix the previous checkin 2020-08-17 21:55:55 -07:00
Timothy Stack 45630545ed [lss] fix identifier highlighting 2020-08-17 21:31:23 -07:00
Timothy Stack bda6fe46b1 [view_curses] minor fix for ansi display 2020-08-15 21:58:19 -07:00
Timothy Stack ae08c12aa0 [docs] some updates 2020-07-02 15:04:44 -07:00
Tim Stack 4f9ff532fa
Delete cmake.yml 2020-07-02 09:29:36 -07:00
Tim Stack 3946024e43
Create cmake.yml 2020-07-01 22:09:32 -07:00
Tim Stack f956db916c
Update c-cpp.yml 2020-07-01 15:36:18 -07:00
Tim Stack 80b1576e63
Update c-cpp.yml
parallelize build and upload artifact
2020-07-01 15:02:37 -07:00
Tim Stack f29f93978d
Update c-cpp.yml
install packages
2020-07-01 14:40:42 -07:00
Tim Stack ef8e89d9ff
Create c-cpp.yml 2020-07-01 14:19:32 -07:00
Timothy Stack d040e75d42 [build] fix a test 2020-06-28 22:56:24 -07:00
Timothy Stack e0181a0adb [build] fix build when libcurl is available
Fixes #739
2020-06-24 11:57:41 -07:00
Tim Stack 0dfff0936b
Create FUNDING.yml 2020-06-12 14:15:23 -07:00
Timothy Stack 4250fe9c67 bump hunter version 2020-06-09 20:39:51 -07:00
Timothy Stack d2b9d1cd1c [docs] fix overflow in log formats section 2020-05-22 21:32:49 -07:00
Timothy Stack 07d5aba7b5 [build] remove test files 2020-05-19 22:23:16 -07:00
Timothy Stack ebd1038057 [pretty] include linefeeds in the pretty output
Defect Number:
    Reviewed By:
   Testing Done:
2020-05-19 22:13:52 -07:00
Timothy Stack 7a0cb4359c [docs] fix lexing of lnav commands 2020-05-18 22:21:24 -07:00
Timothy Stack ee7ffb7194 [docs] add generated sql reference 2020-05-18 21:09:47 -07:00
Timothy Stack 9c3f0eee89 [build] fix cmake build and lexing of sqlite in docs
Defect Number:
    Reviewed By:
   Testing Done:
2020-05-18 07:10:07 -07:00
Timothy Stack e85fff0b88 [sql] add json_concat() function and misc fixes 2020-05-17 22:23:30 -07:00
Timothy Stack 468a5ea5d2 [docs] fix json-ptr ref 2020-05-15 11:02:46 -07:00
Timothy Stack e3ac0e5825 [build] missing doc package 2020-05-15 10:41:09 -07:00
Timothy Stack adb18eeea3 [build] try to fix doc build 2020-05-15 10:38:28 -07:00
Timothy Stack 9cbe4d73a9 [docs] start to flesh out command and sql docs 2020-05-15 07:38:40 -07:00
Timothy Stack defb00303f [docs] some changes 2020-05-13 09:38:41 -07:00
Timothy Stack 6073464722 [build] disable test for now 2020-05-09 21:48:37 -07:00
Timothy Stack a8e97a180b [build] remove stale dep 2020-05-09 13:48:06 -07:00
Timothy Stack f23791af18 [internals] ignore failure to open file 2020-05-09 12:05:45 -07:00
Timothy Stack c6196fe79f [build] missed TEXT2C_FILES 2020-05-09 10:03:28 -07:00
Timothy Stack 8f4149db94 [build] need to dist the format files 2020-05-09 09:55:06 -07:00
Timothy Stack 8e9ef5765f [formats] break up default-log-formats.json into separate files for each file format
Defect Number:
    Reviewed By:
   Testing Done:
2020-05-08 22:04:39 -07:00
Timothy Stack 7e36c6b3d0 [build] do not fail if syslog is not readable during build 2020-05-08 09:36:57 -07:00
Timothy Stack 8413dd13d8 [config] add configs directory 2020-05-07 07:08:59 -07:00
Timothy Stack 99a8eb9850 [build] try again 2020-04-25 17:22:59 -07:00
Timothy Stack 9b28a90ab0 pay attention to the result of rebuild_index() 2020-04-25 15:43:31 -07:00
Timothy Stack 7e538c85f9 [tests] try to fix breakage 2020-04-25 13:30:28 -07:00
Timothy Stack 8a0193691f ignore stdin when it is from /dev/null 2020-04-25 13:19:41 -07:00
Timothy Stack 3da3ec799a [session] allow the name 2020-04-25 07:32:05 -07:00
Timothy Stack 138a506b1a [perf] a few performance tweaks 2020-04-23 06:42:48 -07:00
Timothy Stack 0744a9b6de [docs] mention the view tables
Defect Number:
    Reviewed By:
   Testing Done:
2020-04-21 21:04:03 -07:00
Timothy Stack d5373abeb4 [sql] bind $LINES/$COLS variables to the size of the window
Fixes #698
2020-04-21 06:20:25 -07:00
Timothy Stack 441833ac23 [build] bump version numbers 2020-04-20 22:50:57 -07:00
Timothy Stack 1ca7cbcd82 [.gitignore] add cmake-build 2020-04-20 21:22:51 -07:00
Timothy Stack b5e81fa8fd [snap] bump snap version 2020-04-20 10:25:16 -07:00
Timothy Stack 77834a7576 [build] update hunter version 2020-04-19 14:56:42 -07:00
Timothy Stack eef28d61a6 [view_curses] fix out-of-bounds access in mvwattrline 2020-04-19 14:32:34 -07:00
Timothy Stack 92f28f1174 [logfile] cache line length to fix perf issues with JSON logs 2020-03-11 07:25:39 -07:00
Timothy Stack 07f4b56646 [tests] update some expected results
so lazy...
2020-01-17 05:43:15 -08:00
Tim Stack eb426afe36
Merge pull request #709 from sblondon/add_multithread_log_lnav
Add thread id for multithreaded Apache error log
2020-01-17 05:35:52 -08:00
Stéphane Blondon 70ed1c9af7 Add thread id for multithreaded Apache error log 2020-01-17 12:22:41 +01:00
Tim Stack c048290474
Merge pull request #702 from enguerrand/master
[delete-filter] Fix issue #701: (Filter deletion before enter)
2019-11-25 07:23:14 -08:00
edr 3e82a06302 [delete-filter] Fix issue #701: (Filter deletion before enter) 2019-11-23 19:55:32 +01:00
Tim Stack f152107857
Merge pull request #692 from arouene/master
Fix typo in manpage
2019-10-23 15:02:49 -07:00
Aurélien Rouëné 9313b372a1
Merge pull request #1 from arouene/remove-parameter-s-from-manfile
Fix typo in manfile
2019-10-23 22:32:34 +02:00
Aurélien Rouëné f8ef4c1b17
Fix typo in manfile
Remove useless -s parameter as it does not seems to be used any more.
2019-10-23 22:31:08 +02:00
Timothy Stack 9db2dfa7a4 [theme] default to using default colors and, if default coloring is not enabled, turn -1 into white/black for fg/bg 2019-10-23 06:09:47 -07:00
Tim Stack 2ed88815da
Update README.md 2019-10-21 15:53:58 -07:00
Timothy Stack e525d247ae [json-log] some more fixes for handling invalid json logs 2019-10-19 07:11:47 -07:00
Timothy Stack 10b8d64b03 [lnav_log] fix lldb arguments 2019-10-17 20:02:32 -07:00
Timothy Stack 8b750c83f1 update expected output 2019-09-11 08:12:56 -07:00
Timothy Stack 0935e1c356 missed adding redirect-to to the docs 2019-09-11 08:11:20 -07:00
Timothy Stack 5901c92794 [open-cmd] use line_buffer to load preview data
Fixes #680
2019-09-11 06:01:16 -07:00
Timothy Stack 98519b045a [help] mention hide/show-unmarked-lines
Fixes #631
2019-09-10 05:50:10 -07:00
Timothy Stack b7255419e6 [test] fix sed usage
Fixes #572
2019-09-10 05:39:34 -07:00
Timothy Stack 9d6e6e4638 [build] fix a typo 2019-09-09 22:10:50 -07:00
Timothy Stack 27587ee917 [test] get test working on OS X 2019-09-09 21:47:41 -07:00
Tim Stack 03dc27f30a
Merge pull request #641 from matt-hayden/master
More clipboard commands
2019-09-09 21:37:07 -07:00
Tim Stack b2463e44a3
Merge pull request #677 from phord/gzip-index
Add a gzip indexing class for faster gz navigation
2019-09-09 21:35:44 -07:00
Timothy Stack f11364660d [build] missed file in makefile 2019-09-03 07:27:24 -07:00
Timothy Stack 73e902f7d8 [json-log] handle invalid json log lines
Header from folded patch 'foldme1.patch':

[local] foldme
2019-09-03 06:19:57 -07:00
Timothy Stack cd3b9bbb71 [docs] start a CLI options page 2019-08-20 07:21:41 -07:00
Phil Hord 5513deeade Add a gzip indexing class for faster gz navigation
The gzread function is slow.  Every time you seek to a new location, the
whole file up to that position has to be decompressed again.  This causes
massive lags when trying to do simple things in lnav on a large .gz file.

Use the zlib inflate* functions instead and record the dictionary
periodically while processing the file the first time.  Then use
inflateSetDictionary to restore the dictionary to a convenient
location when trying to seek into the file again in the future.

Use a default period of 1MB of compressed data for syncpoints.
Each syncpoint uses 32KB. This is a ratio of 3.2%.  For example,
a 1GB .gz file (compressed size) will require us to keep 32MB
of index data in memory. A better method may be to use a fixed
number of syncpoints and divide the file appropriately. This
would keep the memory bounded at the cost of slower file
navigation on large .gz files.

Use pread to read the data for the stream decompressor and remove
the lock_hack previously employed.

NB. The documentation on these zlib functions is sparse. I followed
the example in zlib/examples/zran.c, but I used the z_stream total_in
and total_out variables instead of keeping my own separately as zran.c
does.  Maybe this is incompatible with some very old zlib versions.
I haven't looked.
2019-08-17 18:40:55 -07:00
Timothy Stack 165cd69c8d [vmw_log] allow colons in user names 2019-08-10 22:16:54 -07:00
Timothy Stack 585986057d [build] missed cleaning a dir up 2019-08-10 21:59:43 -07:00
Timothy Stack 56a341f7f8 [view_curses] colors
Defect Number:
    Reviewed By:
   Testing Done:
2019-08-07 09:46:19 -07:00
Timothy Stack 9a05b9d186 [config] pay attention to XDG_CONFIG_HOME
Fixes #105
2019-08-01 07:14:47 -07:00
Timothy Stack 07cc749c50 [stdin-capture] change save limit to 10MB 2019-07-31 10:11:23 -07:00
Timothy Stack 71f56d29da [hotkeys] remove extra call to textview_curses->handle_key() 2019-07-31 09:02:39 -07:00
Timothy Stack ed67c6cf9f Remove noisy log message
Fixes #648
2019-07-30 21:50:02 -07:00
Timothy Stack 3669b73e5b [highlight] avoid highlighting keywords in comments and strings 2019-07-30 07:06:16 -07:00
Timothy Stack e442f84e80 [textview] pause loading of files by pressing =
Fixes #670
2019-07-30 06:28:42 -07:00
Timothy Stack 63dba408ec [stdin] Keep the stdin piper file in .lnav so that it can be reopened
When piping the output of a program into lnav, the data would
be dumped to the terminal on exit so that it would not be
lost.  Since that is a bit noisy, the temp file used to store
the data is now left in .lnav so that it can be reopened later.
Older stdin captures are automatically removed after a day.

Also took the opportunity to start using filesystem::path more.

Fixes #436
2019-07-29 22:18:32 -07:00
Tim Stack 74d026cb76
Merge pull request #672 from djoreilly/fix-openstack-debug
Fix openstack_log debug level
2019-07-29 15:18:28 -07:00
Darragh O'Reilly 6e93145f23 Fix openstack_log debug level
So ":set-min-log-level info" gets rid of lines with DEBUG.
2019-07-29 17:22:51 +01:00
Timothy Stack ffd9d88add [log_format] ignore line-format field if timestamp-format is set
Fixes #661
2019-07-26 01:16:37 -07:00
Timothy Stack 34db64aa32 [logfile] the index rebuild didn't check the mtime if the file size was the same
Fixes #668
2019-07-25 07:31:46 -07:00
Timothy Stack d381197195 [highlights] a little too quick on the last checkin 2019-07-24 13:43:01 -07:00
Timothy Stack e6590e94e2 [highlight] fix highlights
Fix #667
2019-07-24 13:37:05 -07:00
Timothy Stack 65d2f7552c [cmake] install the binary 2019-07-22 10:36:47 -07:00
Timothy Stack 91dd8a84ec [cmake] enable jit for libpcre 2019-07-15 23:04:31 -07:00
Timothy Stack 76ea0abcd9 [cmake] check for libutil 2019-07-15 20:51:43 -07:00
Timothy Stack 7c485f64dc [cmake] fix some test targets 2019-07-15 10:08:14 -07:00
Timothy Stack fa1217e2f6 [cmake] fix config value 2019-07-15 09:46:40 -07:00
Timothy Stack 0882f95ef4 [cmake] remove HOMEPAGE_URL from project() 2019-07-15 08:40:44 -07:00
Timothy Stack 8bb1d4a732 [cmake] add configure stuff 2019-07-14 23:18:53 -07:00
Timothy Stack 1257fcd62a [codacy] fix a few issues turned up 2019-07-11 14:59:54 -07:00
Timothy Stack ea7663feba oops, missed the cmake dir 2019-07-09 13:47:41 -07:00
Timothy Stack 325e4a15d9 [build] test out the hunter package manager 2019-07-09 08:34:55 -07:00
Timothy Stack 76edd2a9d1 [line_buffer] refactor left a bug with non-blocking files
Fixes #662
2019-06-27 10:19:54 -07:00
Timothy Stack b81b35c866 [log-view] in time-offset mode, show negative times for messages before the first mark
Prototype for #395
2019-06-26 21:52:40 -07:00
Timothy Stack d61f2568d6 [ptimec] fix a case of undefined behavior 2019-06-21 17:19:56 -07:00
Timothy Stack de6ec92f2f [yajlpp] fix config save 2019-06-21 05:14:00 -07:00
Timothy Stack a9e9613214 [textfile] fix search issue 2019-06-18 06:28:40 -07:00
Timothy Stack 26ada4dd2f [grep_proc] missed draining the IPC pipe 2019-06-17 21:02:45 -07:00
Timothy Stack e27cf3b158 [data-parser] limit the number of pairs produced
Fixes #645
2019-06-16 07:26:47 -07:00
Timothy Stack a10fa06b10 [build] remove test file 2019-06-15 06:48:33 -07:00
Timothy Stack 02c53976b4 Some refactoring for the line buffer and other cleanups
Fixes #649
2019-06-15 06:32:02 -07:00
Timothy Stack b5c6ed6240 [rebiuld] fix an issue when a text file is truncated 2019-05-23 21:21:39 -07:00
Timothy Stack f0000ae065 [keymap] redo the keymap definition
Defect Number:
    Reviewed By:
   Testing Done:
2019-05-23 06:28:42 -07:00
Timothy Stack e18e8e214a [build] missed lambda captured 2019-05-21 22:37:36 -07:00
Timothy Stack 0918063640 [cleanup] some modernization 2019-05-21 22:14:36 -07:00
Timothy Stack 6cf5cc8213 [logfile] fix issue when files have headers
Defect Number:
    Reviewed By:
   Testing Done:
2019-05-17 07:42:05 -07:00
Timothy Stack 3c85936999 [jsonlog] fix ident highlight when body has newlines 2019-05-16 02:23:06 -07:00
Timothy Stack 1fc24ecabf [bin2c] improve building of data files that are incorporated into the binary 2019-05-15 09:13:56 -07:00
Timothy Stack c7046b0b54 [json] newlines in the line format cause problems
Fixes #644
2019-05-13 10:44:33 -07:00
Timothy Stack bb6f31eaa0 [theme] styling for scrollbars 2019-05-12 06:53:40 -07:00
Timothy Stack ecd17a9f97 [build] distclean fix 2019-05-08 09:28:49 -07:00
Timothy Stack 76b08f5fe3 [build] fix other lib order 2019-05-08 09:11:22 -07:00
Timothy Stack e80ec6ec73 [build] fix lib order 2019-05-08 09:07:29 -07:00
Timothy Stack 28a275e4fb [build] try to fix 2019-05-08 07:42:55 -07:00
Timothy Stack 65d9240300 [theme] add eldar theme 2019-05-08 06:05:09 -07:00
Timothy Stack fb7d6eafaf [build] some refactoring of files 2019-05-08 05:30:59 -07:00
Timothy Stack 63e53377c3 [theme] add monocai theme 2019-05-04 10:35:23 -07:00
Timothy Stack 147dea9d8c [build] oops, missed adding these files 2019-05-04 09:44:35 -07:00
Timothy Stack a8e1f62da6 [build] add fmt lib 2019-05-04 07:07:39 -07:00
Timothy Stack a648657ff3 add notice to levels defined in formats 2019-05-03 15:02:09 -07:00
Timothy Stack fc9f9f43cf add bad-config to the dist 2019-05-03 14:29:27 -07:00
Timothy Stack e8f4020c67 fix crash 2019-05-03 14:17:56 -07:00
Timothy Stack 06d1098211 [config] initial support for themes
For #422

Still more to do
2019-05-03 13:50:19 -07:00
Matt Hayden e66bf9213b Example clipboard handler for Linux and WSL 2019-04-24 23:11:25 -06:00
Matt Hayden 66285bbb62 Clipboard copy/paste for Wayland and tmux
With special thanks to neovim for example commands
2019-04-24 21:45:56 -06:00
Timothy Stack 6f451eec35 [pretty] fix crash when rewriting lines 2019-04-18 04:26:24 -07:00
Timothy Stack 5e8a1cebe9 [json-log] handle arrays in json log message fields
Fixes #635
2019-04-17 06:17:11 -07:00
Timothy Stack 832f980ab9 [version] set to v0.8.5 2019-04-07 10:26:50 -07:00
Tim Stack 776705e90e
Merge pull request #627 from matt-hayden/master
Support for Windows Subsystem for Linux clipboard command
2019-03-21 22:14:56 -07:00
Matt Hayden (Innolitics) ba48d31120 Support for Windows Subsystem for Linux clipboard command 2019-03-21 11:16:29 -06:00
Timothy Stack 062d480fea [sql] fix some issues found while trying to query some logs 2019-03-21 07:46:51 -07:00
Timothy Stack 2fa603d07e [tests] fix a test 2019-03-15 22:38:10 -07:00
Timothy Stack c4b950e4d9 bump version to v0.8.5-rc1 2019-03-15 22:13:18 -07:00
Timothy Stack 78d80fddd5 [cli] add -r flag for recursively loading files from a directory hierarchy
Fixes #431
2019-03-14 22:24:57 -07:00
Timothy Stack 8d3b83403c [format] some updates to the haproxy format 2019-03-14 06:35:15 -07:00
Timothy Stack 33cdbefaaa [help] some online help additions 2019-03-13 23:07:39 -07:00
Timothy Stack 21c5c52843 [format] allow multiple log format patterns per log file
This tries to address #624
2019-03-13 16:37:41 -07:00
Timothy Stack 0e12f98ae7 [sql] change base_time to time_offset 2019-03-12 22:41:39 -07:00
Timothy Stack 0de761ce4f [build] fix linux build issue 2019-03-12 22:27:41 -07:00
Timothy Stack 469124d72b [time-offset] fixes
Defect Number:
    Reviewed By:
   Testing Done:
2019-03-12 07:06:31 -07:00
Timothy Stack 6f41cbe394 minor cleanup 2019-03-08 07:31:52 -08:00
Timothy Stack efa6aded3a [filter] fix for multiple files 2019-03-05 12:33:46 -08:00
Timothy Stack bc4004de9e [environ_vtab] the first var was being skipped 2019-02-27 07:14:17 -08:00
Timothy Stack 4614cbcb75 [sql] fix joins on some vtables 2019-02-18 14:44:59 -08:00
Timothy Stack 43243c7ba3 [build] revive freebsd release build
Some misc fixes for filtering as well
2019-02-17 07:40:35 -08:00
Tim Stack 0f6860c833
Update .cirrus.yml 2019-02-17 00:10:18 -08:00
Tim Stack df8844eb77
Update .cirrus.yml 2019-02-17 00:00:22 -08:00
Tim Stack bdf202e487
Update .cirrus.yml 2019-02-16 23:56:15 -08:00
Tim Stack 8ad095fc71
Create .cirrus.yml 2019-02-16 23:47:26 -08:00
Timothy Stack 9fea61abf8 [bottom-status] missing percent 2019-02-15 22:31:15 -08:00
Timothy Stack d62da7c27c [build] try to fix windows x86 build 2019-02-15 22:27:55 -08:00
Timothy Stack 02b9e13343 [filters] add the number of hits for each filter in the editor
Might be useful to know the number of hits for a given filter.
2019-02-15 09:22:32 -08:00
Timothy Stack a682b02168 [vtab] use template for integral to_sqlite() calls 2019-02-15 06:07:06 -08:00
Timothy Stack 659f01c9ae [filters] add a log_filters column to log tables that contains the matched filters
Related to #597
2019-02-14 22:42:44 -08:00
Timothy Stack e0ee2c6706 Fixes #613 2019-02-14 06:15:58 -08:00
Timothy Stack 1e795c1e4a [ui] move filter editor help to separate status bar
The help is unreadable when the terminal width is
small.
2019-02-13 21:54:40 -08:00
Timothy Stack 4a7d116f37 [docs] expand the collate format field a little more 2019-02-06 22:40:07 -08:00
Timothy Stack d66303b75a [status] fix display when there are no matches for a search 2019-02-06 22:25:35 -08:00
Timothy Stack 153b59ea8a [status] some fixes for the bottom status bar
Fixes #603
Fixes #578
2019-02-05 07:30:57 -08:00
Timothy Stack 1a932f3a41 [cmds] :q! should quit lnav
Fixes #607
2019-02-03 22:10:27 -08:00
Timothy Stack d1a556638b [filters] save disabled filters in the session 2019-02-03 22:03:52 -08:00
Timothy Stack 104b8736e8 [vtab] fix for failed update to log_tags column and fix filtering with json logs 2019-02-01 13:31:28 -08:00
Timothy Stack 527150d6a0 [readline] fix highlighting of tab completion 2019-01-29 09:58:34 -08:00
Timothy Stack 3d77fb2acf [cmds] change :write-raw-to to write all the lines in the view
Fixes #606
2019-01-29 07:30:37 -08:00
Timothy Stack 8a3bdbfb2f [filter] fix some glitches 2019-01-28 21:59:05 -08:00
Timothy Stack 9936f1e814 bump some dependencies for release builds 2019-01-28 21:58:41 -08:00
Timothy Stack 31c440777f [hotkeys] add ctrl+f to toggle filters
Fixes #604
2019-01-27 08:05:44 -08:00
Timothy Stack 69508e6467 [search] try to fix an issue with search progress bar never stopping
Possible fix for #588
2019-01-26 08:01:44 -08:00
Timothy Stack 0c2f84a3c0 [hotkeys] press 7/8 for previous/next minute
Fixes #382
2019-01-25 07:45:17 -08:00
Timothy Stack 85671755d3 [readline] fix alignment in SQL help
related to #598
2019-01-25 07:25:37 -08:00
Timothy Stack 5fff4d8784 [help] add some initial help text for search/SQL prompts
Also:
  * You can now "scroll out" of the visual editor to
    return to the main view.  This should alleviate the
    frustration of pressing up/down arrows thinking the
    main view should move but, really, you're stuck in
    the editor.
  * The three-dot-ellipsis for hidden fields has been
    replaced with a unicode vertical ellipsis so that
    less space is taken up.
2019-01-24 22:05:15 -08:00
Timothy Stack 6853034cce [cleanup] some minor cleanup and perf fixes
Files:
  * filter_sub_source.cc: Fix some performance issues
  * filter_sub_source.hh: The readline context should
    be case-INsensitive for completions
  * readline_curses.cc, session_data.cc: modernize
2019-01-21 14:15:00 -08:00
Timothy Stack e451e10910 typo on zoom hotkey
Fixes #596
2019-01-14 20:50:18 -08:00
Timothy Stack 4381c23641 some build and cleanup 2019-01-13 19:14:26 -08:00
Timothy Stack dcccebe797 [sql] add some help for regexp_capture()
Fixes #593
2019-01-13 19:02:50 -08:00
Timothy Stack 7dfa0e9dd4 [textview] highlights that start from the beginning of the line are not working in the log view
The log view prefixes lines with some extra characters and they
were mistakenly being included when performing the highlight
regex.

Fixes #590
2019-01-01 08:24:02 -08:00
Timothy Stack 66ef968529 [logfile] fix a performance bug in searching json logs 2018-12-16 21:45:10 -08:00
Timothy Stack d65a8be9d1 [build] missed include 2018-12-14 07:54:31 -08:00
Timothy Stack 7c95941920 [build] add ring_span.hh to makefile 2018-12-14 07:33:01 -08:00
Timothy Stack cdbf4dabda [build] missed file 2018-12-14 07:12:55 -08:00
Timothy Stack a63b6a199c [filter] in the filter editor, use "t" to toggle the type of filter
Related to #423
2018-12-14 07:10:50 -08:00
Timothy Stack 814ad03ec9 [view] keep a history of view positions
Fixes #577
2018-12-14 06:18:56 -08:00
Tim Stack 7fe811da07
Update README.md
add link to angle-grinder
2018-12-13 06:16:40 -08:00
Timothy Stack 5769bcbb4a whiff
missed refreshing patch
2018-12-02 09:34:36 -08:00
Timothy Stack 42be76c3ba [readline] fix some broken shortcuts
Defect Number:
    Reviewed By:
   Testing Done:
2018-12-02 07:58:30 -08:00
Timothy Stack d46cfa1a8c [sql] timeslice() fails on 32-bit
Fixes #563
2018-12-01 07:54:29 -08:00
Timothy Stack afef6b1827 [build] fix some warnings and a 32-bit compile error 2018-12-01 07:47:52 -08:00
Timothy Stack f2b9988c95 [internal] capture stderr while in curses and log it
Fixes #582
2018-11-29 07:16:25 -08:00
Timothy Stack e001b49e28 [format] hidden object/array fields add sub-lines when they should not
Fixes #576
2018-11-26 10:30:27 -08:00
Timothy Stack b4e7bc9b0f [cmds] fix a glitch when adding a comment on a small screen 2018-11-22 21:12:13 -08:00
Timothy Stack 1a08eb0d12 [cmds] allow commands to set the prompt
Fixes #574 and #573
2018-11-21 17:00:28 -08:00
Timothy Stack 49dce3cec2 [readline] fix escaping out of prompt 2018-11-20 08:15:58 -08:00
Timothy Stack aae4650b95 [hotkeys] fix a crash when pressing 'I' that is due to a previous change 2018-11-19 11:07:22 -08:00
Timothy Stack 2c5bfc830e xterm fix wasn't quite right... 2018-11-17 07:45:18 -08:00
Timothy Stack 8b5b8743b1 try make locale test optional
Fixes #562
2018-11-16 07:32:07 -08:00
Timothy Stack 64d4226a89 disable test_top_status for now 2018-11-15 09:47:54 -08:00
Timothy Stack b53ac5e3a6 try to fix after_script 2018-11-15 09:16:23 -08:00
Timothy Stack 5c6cc5fe2a [readline] pressing escape should exit the command prompt
Fixes #316
2018-11-15 06:43:28 -08:00
Timothy Stack 31a19ac753 [vtab] fix the SQL function adapter for vector refs 2018-11-15 05:25:02 -08:00
Timothy Stack 6336fa56e9 [cmds] :write-json-to should passthru JSON columns as JSON instead of strings
Fixes #565
2018-11-14 21:46:49 -08:00
Timothy Stack f6a84ed081 [display] fix colors on a plain xterm display 2018-11-13 21:57:47 -08:00
Timothy Stack aa0bfd6c62 [sql] add a spooky_hash() function
Fixes #567
2018-11-13 20:55:04 -08:00
Timothy Stack ec82ecda62 [filter] display the number of filters 2018-11-10 22:55:08 -08:00
Timothy Stack efe6ccf0d1 [filter] change from backquote to tab for activating filter panel 2018-11-09 13:59:27 -08:00
Timothy Stack 2345a32423 [filter] add panel that shows the set of filters
Initial version, still needs some cleanup
2018-11-09 09:45:19 -08:00
2131 changed files with 322047 additions and 134283 deletions

5
.cirrus.yml Normal file
View File

@ -0,0 +1,5 @@
freebsd_instance:
image: freebsd-12-1-release-amd64
task:
install_script: pkg install -y wget git m4 bash autoconf automake sqlite3 gmake
build_script: ./autogen.sh && ./configure && gmake -j3

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

2
.coveralls.yml Normal file
View File

@ -0,0 +1,2 @@
service_name: github-actions

17
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**lnav version**
v0.11.1 is the latest
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

10
.github/mlc_config.json vendored Normal file
View File

@ -0,0 +1,10 @@
{
"ignorePatterns": [
{
"pattern": "^/assets"
},
{
"pattern": "^https://archive.org"
}
]
}

191
.github/workflows/c-cpp.yml vendored Normal file
View File

@ -0,0 +1,191 @@
name: ci-build
on:
push:
branches: [ master ]
tags: ['*']
pull_request:
branches: [ master ]
jobs:
coverage:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
# - 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
# run: pip install --user cpp-coveralls
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure --disable-static --enable-code-coverage --enable-debug CFLAGS=-g3 CXXFLAGS=-g3
- name: make
run: make -j3
- name: make check
run: make check
- name: upload cover
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
TRAVIS_JOB_ID: ${{ github.run_id }}-${{ github.run_number }}
run: >-
coveralls
--exclude src/doctest.hh
--exclude src/fmtlib
--exclude src/ghc
--exclude src/k_merge_tree.h
--exclude src/mapbox
--exclude src/pugixml
--exclude src/base/result.h
--exclude src/safe
--exclude src/spookyhash
--exclude src/third-party
--exclude src/ww898
--exclude src/yajl
--exclude test
--exclude src/data_scanner_re.cc
--gcov-options '\-lp'
build:
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++
libpcre2-dev
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
- name: make
run: make -j4
- name: make distcheck
run: make distcheck -j4 || (test -e lnav-*/_build/sub/src/tailer/test-suite.log && cat lnav-*/_build/sub/src/tailer/test-suite.log && false) || (test -e lnav-*/_build/sub/test/test-suite.log && cat lnav-*/_build/sub/test/test-suite.log && false)
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
# Artifact name
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

12
.github/workflows/check-md-links.yml vendored Normal file
View File

@ -0,0 +1,12 @@
name: Check Markdown links
on: push
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: '.github/mlc_config.json'

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 }}

33
.github/workflows/tailer-ape.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: tailer-ape
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: update apt
run: sudo apt-get update
- name: Install packages
run: >-
wget https://github.com/tstack/cosmopolitan/releases/download/v1.0stack/cosmopolitan-amalgamation-1.0-stack.zip &&
unzip cosmopolitan-amalgamation-1.0-stack.zip
- name: Build
run: >-
gcc -g -Os -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone
-fno-omit-frame-pointer -pg -mnop-mcount
-o tailer.dbg -I src/tailer
src/tailer/tailer.main.c src/tailer/tailer.c src/tailer/sha-256.c
-fuse-ld=bfd -Wl,-T,ape.lds
-include cosmopolitan.h crt.o ape.o cosmopolitan.a
- name: Objcopy
run: objcopy -S -O binary tailer.dbg src/tailer/tailer.ape
- uses: stefanzweifel/git-auto-commit-action@v4
with:
# Optional, but recommended
# Defaults to "Apply automatic changes"
commit_message: Update tailer
file_pattern: src/tailer/tailer.ape

17
.gitignore vendored
View File

@ -2,7 +2,7 @@
.lnav
*.dat
*.diff
*.err
test/*.err
*.index
*.log
*.o
@ -10,10 +10,13 @@
*.pyc
*.tmp
*.trs
*~
.idea/
Makefile
Makefile.in
TESTS_ENVIRONMENT
aclocal.m4
aminclude_static.am
ar-lib
autom4te.cache
compile
@ -28,12 +31,14 @@ missing
mkinstalldirs
test-driver
docs/build
release/release-NEWS.md
release/linux-pkg/
release/osx-build-dir/
release/osx-pkg/
release/outbox/
release/vagrant-static-linux/.vagrant
release/vagrant-static-linux/lnav
cmake-build-debug/
src/bin2c
src/config.h
src/config.h.in
@ -87,3 +92,13 @@ test/test_pcrepp
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

20
.readthedocs.yaml Normal file
View File

@ -0,0 +1,20 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Optionally build your docs in additional formats such as PDF
formats:
- pdf
# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: docs/requirements.txt

View File

@ -1,48 +0,0 @@
dist: xenial
language: cpp
compiler: gcc
sudo: false
install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
script: ./autogen.sh && ./configure LDFLAGS="-static-libstdc++ -static-libgcc" && make distcheck -j3
after_script: test -e lnav-*/_build/test/test-suite.log && cat lnav-*/_build/test/test-suite.log
env:
global:
- LDFLAGS: -static-libstdc++ -static-libgcc
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "P3wQLswiGYWrZwO4bxFmsA4XG5s/pS+renL0RMeotMTQwQQXmy1ZCvwMnAgaYWQmF82fN8WjuhO3OX0gpDbydxRktqI5ZqblsryV6poB0g+OkCqThbDUp3TL6TjPqySTI1CZ8qoOBYFMubAZYVJAEfxl0UxoQE+uTsRarRqr8rI="
cache:
apt: true
addons:
apt:
packages:
- libgpm-dev
- gcc-5
- g++-5
- sqlite3
- language-pack-fr
sources:
- ubuntu-toolchain-r-test
- sourceline: deb http://cz.archive.ubuntu.com/ubuntu xenial main
coverity_scan:
project:
name: tstack/lnav
description: Your project description here
notification_email: timothyshanestack@gmail.com
build_command_prepend: ./autogen.sh && ./configure
build_command: make
branch_pattern: coverity_scan
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: BQOrhEaDcR53WPGDmBj8UcCtcUjmuTb5g4u1oNhIiF0G5+8UweXOquLf8c52uIkUBYuruc/TB7qWGNisO3skSTh9t8+6v6PE1EAwk5PzavsQqqCmGF32izw75B8TC6SFWQY7AFyKjIc/bHxyz0FA0L2YtvMREtF3jF9ezGek07Y=
file: lnav*.zip
file_glob: true
on:
tags: true

121
ARCHITECTURE.md Normal file
View File

@ -0,0 +1,121 @@
# Architecture
This document covers the internal architecture of the Logfile Navigator (lnav),
a terminal-based tool for viewing and analyzing log files.
## Goals
The following goals drive the design and implementation of lnav:
- Don't make the user do something that can be done automatically.
Example: Automatically detect log formats for files instead of making them
specify the format for each file.
- Be performant on low-spec hardware.
Example: Prefer single-threaded optimizations over trying to parallelize
- Operations should be "live" and not block the user from continuing to work.
Example: Searches are run in the background.
- Provide context-sensitive help.
Example: When the cursor is over a SQL keyword/function, the help text for
that is shown above.
- Show a preview of operations so the user knows what is going to happen.
Example: When entering a `:filter-out` command, the matched parts of the
lines are highlighted in red.
## Overview
The whole of lnav consists of a
[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.
[![lnav architecture](docs/lnav-architecture.png)](https://whimsical.com/lnav-architecture-UM594Qo4G3nt2XWaSZA1mh)
## File Monitoring
Each file being monitored by lnav has an associated [`logfile`](src/logfile.hh)
object, be they plaintext files or files with a recognized format. These
objects are periodically polled by the main event loop to check if the file
was deleted, truncated, or new lines added. While reading new lines, if no
log format has matched yet, each line will be passed through the log format
regular expressions to try and find a match. Each line that is read is added
to an index
#### Why is `mmap()` not used?
Note that file contents are consumed using `pread(2)`/`read(2)` and not
`mmap(2)` since `mmap(2)` does not react well to files changing out from
underneath it. For example, a truncated file would likely result in a
`SIGBUS`.
## Log Messages
As files are being indexed, if a matching format is found, the file is
"promoted" from a plaintext file to a log file. When the file is promoted,
it is added to the [logfile_sub_source](src/logfile_sub_source.hh), which
collates all log messages together into a single index.
### Timestamp Parsing
Since all log messages need to have a timestamp, timestamp parsing needs to be
very efficient. The standard `strptime()` function is quite expensive, so lnav
includes an optimized custom parser and code-generator in the
[ptimec](src/ptimec.hh) component. The code-generator is used at compile-time
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
[external_log_format](src/log_format_ext.hh) objects that are create from
[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
The lnav text-user-interface is built on top of
[ncurses](https://invisible-island.net/ncurses/announce.html).
However, the higher-level functionality of panels, widgets, and such is not
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/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
provided by a source.
- [textview_curses](src/textview_curses.hh) - Builds on the list view by adding
support for searching, filtering, bookmarks, etc... The main panel that
displays the logs/plaintext/help is a textview.
- [statusview_curses](src/state-extension-functions.cc) - Draws the status bars
at the top and bottom of the TUI.
- [vt52_curses](src/vt52_curses.hh) - Adapts vt52 escape codes to the ncurses
API.
- [readline_curses](src/readline_curses.hh) - Provides access to the readline
library. The readline code is executed in a child process since readline
does not get along with ncurses. The child process and readline is set to
use a vt52 terminal and the vt52_curses view is uses to translate those
escape codes to ncurses.
The following diagram shows the underlying components that make up the TUI:
[![lnav TUI](docs/lnav-tui.png)](https://whimsical.com/lnav-tui-MQjXc7Vx23BxQTHrnuNp5F)

18
AUTHORS
View File

@ -13,7 +13,7 @@ Christopher Meng
Salvatore Bonaccorso
Henrietta Stack
Pablo Iranzo Gómez
androm3da (https://github.com/androm3da)
Brian Cain
Paul Wayper
Adam Spiers
Kevin Pham
@ -28,3 +28,19 @@ Jan Chren
Geoff Crompton
Medina Maza
Phil Hord
Tristan Ramseyer
Aurélien Rouëné
Emiliano Bonassi
Darragh O'Reilly
Stéphane Blondon
Miguel Terron
Enguerrand de Rochefort
Nicolas Werner
Matt Hayden
Simos Xenitellis
Finnegan Stack
Amos Bird
Cristian Chiru
Peter Schiffer
Pedro Pombeiro
Fredrik Forséll

View File

@ -1,6 +1,59 @@
cmake_minimum_required(VERSION 3.14)
include(cmake/prelude.cmake)
set(CMAKE_CXX_STANDARD 14)
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/project-is-top-level.cmake)
include(cmake/variables.cmake)
find_package(SQLite3 REQUIRED)
find_package(BZip2 REQUIRED)
find_package(LibArchive REQUIRED)
find_package(ZLIB REQUIRED)
find_package(pcre REQUIRED)
find_package(pcre2 REQUIRED)
find_package(readline REQUIRED)
find_package(ncurses REQUIRED)
find_package(CURL REQUIRED)
set(lnav_LIBS
CURL::libcurl
SQLite::SQLite3
BZip2::BZip2
ncurses::libcurses
pcre::libpcre
pcre2::pcre2
readline::readline
LibArchive::LibArchive
ZLIB::ZLIB
)
cmake_minimum_required (VERSION 2.6)
SET(CMAKE_CXX_STANDARD 14)
project (lnav)
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
}
}
]
}

2
FUNDING.yml Normal file
View File

@ -0,0 +1,2 @@
# These are supported funding model platforms
github: [tstack]

View File

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

516
NEWS
View File

@ -1,516 +0,0 @@
lnav v0.8.5:
Features:
* The ":write-*" commands will now accept "/dev/clipboard" as a file name
that writes to the system clipboard.
* 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.
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.
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

12
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.
@ -27,6 +27,8 @@ The following software packages are required to build lnav:
re2c - The re2c scanner generator.
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
@ -34,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
@ -65,7 +69,7 @@ ACKNOWLEDGEMENTS
The xterm color database was copied from:
http://jonasjacek.github.io/colors/
https://jonasjacek.github.io/colors/
SEE ALSO
@ -73,4 +77,4 @@ SEE ALSO
The lnav website:
http://lnav.org
https://lnav.org

159
README.md
View File

@ -1,104 +1,100 @@
[![Build Status](https://travis-ci.org/tstack/lnav.png)](https://travis-ci.org/tstack/lnav)
[![Build status](https://ci.appveyor.com/api/projects/status/24wskehb7j7a65ro?svg=true)](https://ci.appveyor.com/project/tstack/lnav)
[![Bounties](https://img.shields.io/bountysource/team/lnav/activity.svg)](https://www.bountysource.com/teams/lnav)
[![LoC](https://tokei.rs/b1/github/tstack/lnav)](https://github.com/tstack/lnav).
<!-- This is a comment for testing purposes -->
_This is the source repository for **lnav**, visit [http://lnav.org](http://lnav.org) for a high level overview._
[![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)
[<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._
# LNAV -- The Logfile Navigator
The log file navigator, lnav, is an enhanced log file viewer that
takes advantage of any semantic information that can be gleaned from
the files being viewed, such as timestamps and log levels. Using this
extra semantic information, lnav can do things like interleaving
messages from different files, generate histograms of messages over
time, and providing hotkeys for navigating through the file. It is
hoped that these features will allow the user to quickly and
efficiently zero in on problems.
The Log File Navigator, **lnav** for short, is an advanced log file viewer
for the small-scale. It is a terminal application that can understand
your log files and make it easy for you to find problems with little to
no setup.
## Screenshot
## Prerequisites
The following screenshot shows a syslog file. Log lines are displayed with
highlights. Errors are red and warnings are yellow.
The following software packages are required to build lnav:
[![Screenshot](docs/assets/images/lnav-syslog-thumb.png)](docs/assets/images/lnav-syslog.png)
* gcc/clang - A C++14-compatible compiler.
* libpcre - The Perl Compatible Regular Expression (PCRE) 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.
* zlib - The zlib compression library.
* bz2 - The bzip2 compression library.
* libcurl - The cURL library for downloading files from URLs. Version 7.23.0 or higher is required.
## Features
- Log messages from different files are collated together into a single view
- Automatic detection of log format
- Automatic decompression of GZip and BZip2 files
- Filter log messages based on regular expressions
- Use SQL to analyze your logs
- And more...
## Installation
Lnav follows the usual GNU style for configuring and installing software:
$ ./configure
$ make
$ sudo make install
__Run `./autogen.sh` before running any of the above commands when
compiling from a cloned repository.__
## Cygwin users
It should compile fine in Cygwin.
Alternatively, you can get the generated binary from [AppVeyor](https://ci.appveyor.com/project/tstack/lnav) artifacts.
Remember that you still need the lnav dependencies under Cygwin, here is a quick way to do it:
setup-x86_64.exe -q -P libpcre1 -P libpcrecpp0 -P libsqlite3_0 -P libstdc++6
Currently, the x64 version seems to be working better than the x86 one.
[Download a statically-linked binary for Linux/MacOS from the release page](https://github.com/tstack/lnav/releases/latest#release-artifacts)
## Usage
The only file installed is the executable, `lnav`. You can execute it
with no arguments to view the default set of files:
$ lnav
```
$ lnav
```
You can view all the syslog messages by running:
$ lnav /var/log/messages*
```
$ lnav /var/log/messages*
```
### Usage with `systemd-journald`
On systems running `systemd-journald`, you can use `lnav` as the pager:
$ journalctl | lnav
```
$ journalctl | lnav
```
or in follow mode:
$ journalctl -f | lnav
```
$ journalctl -f | lnav
```
Since `journalctl`'s default output format omits the year, if you are
viewing logs which span multiple years you will need to change the
output format to include the year, otherwise `lnav` gets confused:
$ journalctl -o short-iso | lnav
```
$ journalctl -o short-iso | lnav
```
It is also possible to use `journalctl`'s json output format and `lnav`
will make use of additional fields such as PRIORITY and _SYSTEMD_UNIT:
will make use of additional fields such as PRIORITY and \_SYSTEMD_UNIT:
$ journalctl -o json | lnav
```
$ 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
```
$ journalctl -a -o json | lnav
```
If using systemd v236 or newer, the output fields can be limited to
the ones actually recognized by `lnav` for increased efficiency:
$ journalctl -o json --output-fields=MESSAGE,PRIORITY,_PID,SYSLOG_IDENTIFIER,_SYSTEMD_UNIT | lnav
```
$ journalctl -o json --output-fields=MESSAGE,PRIORITY,_PID,SYSLOG_IDENTIFIER,_SYSTEMD_UNIT | lnav
```
If your system has been running for a long time, for increased
efficiency you may want to limit the number of log lines fed into
@ -107,18 +103,55 @@ 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.
## Screenshot
## Support
The following screenshot shows a syslog file. Log lines are displayed with
highlights. Errors are red and warnings are yellow.
Please file issues on this repository or use the discussions section.
The following alternatives are also available:
[![Screenshot](http://tstack.github.io/lnav/lnav-syslog-thumb.png)](http://tstack.github.io/lnav/lnav-syslog.png)
- [support@lnav.org](mailto:support@lnav.org)
- [Discord](https://discord.gg/erBPnKwz7R)
- [Google Groups](https://groups.google.com/g/lnav)
## Links
See Also
--------
- [Main Site](https://lnav.org)
- [**Documentation**](https://docs.lnav.org) on Read the Docs
- [Internal Architecture](ARCHITECTURE.md)
The lnav website can be found at:
## Contributing
> [http://lnav.org](http://lnav.org)
- [Become a Sponsor on GitHub](https://github.com/sponsors/tstack)
### Building From Source
#### Prerequisites
The following software packages are required to build lnav:
- gcc/clang - A C++14-compatible compiler.
- 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.
- zlib - The zlib compression library.
- 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
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
```
## See Also
[Angle-grinder](https://github.com/rcoh/angle-grinder) is a tool to slice and dice log files on the command-line.
If you're familiar with the SumoLogic query language, you might find this tool more comfortable to work with.

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
@ -10,6 +13,9 @@ export srcdir
top_builddir=`dirname $0`
export top_builddir
builddir=`pwd -P`
export builddir
test_dir="@abssrcdir@/test"
export test_dir
@ -20,6 +26,15 @@ export BZIP2_SUPPORT
BZIP2_CMD="@BZIP2_CMD@"
export BZIP2_CMD
XZ_CMD="@XZ_CMD@"
export XZ_CMD
TSHARK_CMD="@TSHARK_CMD@"
export TSHARK_CMD
LIBARCHIVE_LIBS="@LIBARCHIVE_LIBS@"
export LIBARCHIVE_LIBS
HOME="${top_builddir}/test"
export HOME
@ -30,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
@ -45,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.
#
@ -61,10 +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.
#
@ -81,25 +168,31 @@ run_test() {
# EOF
#
check_output() {
sed -ibak \
-e "s;${test_dir};{test_dir};g" \
-e "s;${top_srcdir};{top_srcdir};g" \
${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
fi
test_num=`expr ${test_num} \+ 1`
}
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
fi
test_num=`expr ${test_num} \+ 1`
}
test_filename() {
echo ${test_file_base}_${test_num}.tmp
}
test_err_filename() {
@ -107,10 +200,14 @@ test_err_filename() {
}
check_error_output() {
sed -ibak \
-e "s;${test_dir};{test_dir};g" \
-e "s;${top_srcdir};{top_srcdir};g" \
${test_file_base}_${test_num}.err
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
@ -120,7 +217,7 @@ check_error_output() {
#
# Grep for a string in the output generated by a run_test() call.
#
# Usage: grep_output_for <string> <fail maessage>
# Usage: grep_output_for <string> <fail message>
#
# Example:
#
@ -137,12 +234,21 @@ grep_output_for() {
echo "${test_file_base}_${test_num}.tmp: $2"
exit 1
fi
test_num=`expr ${test_num} \+ 1`
}
on_error_log() {
if test $? -ne 0; then
echo $1 > /dev/stderr
cat ${test_file_base}_${test_num}.tmp
cat ${test_file_base}_${test_num}.err
fi
}
on_error_fail_with() {
if test $? -ne 0; then
echo $1 > /dev/stderr
cat ${test_file_base}_${test_num}.tmp
cat ${test_file_base}_${test_num}.err
exit 1
fi
}
@ -159,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,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

438
cmake/CodeCoverage.cmake Normal file
View File

@ -0,0 +1,438 @@
# Copyright (c) 2012 - 2017, Lars Bilke
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors
# may be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# CHANGES:
#
# 2012-01-31, Lars Bilke
# - Enable Code Coverage
#
# 2013-09-17, Joakim Söderberg
# - Added support for Clang.
# - Some additional usage instructions.
#
# 2016-02-03, Lars Bilke
# - Refactored functions to use named parameters
#
# 2017-06-02, Lars Bilke
# - Merged with modified version from github.com/ufz/ogs
#
# 2019-05-06, Anatolii Kurotych
# - Remove unnecessary --coverage flag
#
# 2019-12-13, FeRD (Frank Dana)
# - Deprecate COVERAGE_LCOVR_EXCLUDES and COVERAGE_GCOVR_EXCLUDES lists in favor
# of tool-agnostic COVERAGE_EXCLUDES variable, or EXCLUDE setup arguments.
# - CMake 3.4+: All excludes can be specified relative to BASE_DIRECTORY
# - All setup functions: accept BASE_DIRECTORY, EXCLUDE list
# - Set lcov basedir with -b argument
# - Add automatic --demangle-cpp in lcovr, if 'c++filt' is available (can be
# overridden with NO_DEMANGLE option in setup_target_for_coverage_lcovr().)
# - Delete output dir, .info file on 'make clean'
# - Remove Python detection, since version mismatches will break gcovr
# - Minor cleanup (lowercase function names, update examples...)
#
# 2019-12-19, FeRD (Frank Dana)
# - Rename Lcov outputs, make filtered file canonical, fix cleanup for targets
#
# 2020-01-19, Bob Apthorpe
# - Added gfortran support
#
# 2020-02-17, FeRD (Frank Dana)
# - Make all add_custom_target()s VERBATIM to auto-escape wildcard characters
# in EXCLUDEs, and remove manual escaping from gcovr targets
#
# USAGE:
#
# 1. Copy this file into your cmake modules path.
#
# 2. Add the following line to your CMakeLists.txt (best inside an if-condition
# using a CMake option() to enable it just optionally):
# include(CodeCoverage)
#
# 3. Append necessary compiler flags:
# append_coverage_compiler_flags()
#
# 3.a (OPTIONAL) Set appropriate optimization flags, e.g. -O0, -O1 or -Og
#
# 4. If you need to exclude additional directories from the report, specify them
# using full paths in the COVERAGE_EXCLUDES variable before calling
# setup_target_for_coverage_*().
# Example:
# set(COVERAGE_EXCLUDES
# '${PROJECT_SOURCE_DIR}/src/dir1/*'
# '/path/to/my/src/dir2/*')
# Or, use the EXCLUDE argument to setup_target_for_coverage_*().
# Example:
# setup_target_for_coverage_lcov(
# NAME coverage
# EXECUTABLE testrunner
# EXCLUDE "${PROJECT_SOURCE_DIR}/src/dir1/*" "/path/to/my/src/dir2/*")
#
# 4.a NOTE: With CMake 3.4+, COVERAGE_EXCLUDES or EXCLUDE can also be set
# relative to the BASE_DIRECTORY (default: PROJECT_SOURCE_DIR)
# Example:
# set(COVERAGE_EXCLUDES "dir1/*")
# setup_target_for_coverage_gcovr_html(
# NAME coverage
# EXECUTABLE testrunner
# BASE_DIRECTORY "${PROJECT_SOURCE_DIR}/src"
# EXCLUDE "dir2/*")
#
# 5. Use the functions described below to create a custom make target which
# runs your test executable and produces a code coverage report.
#
# 6. Build a Debug build:
# cmake -DCMAKE_BUILD_TYPE=Debug ..
# make
# make my_coverage_target
#
include(CMakeParseArguments)
# Check prereqs
find_program( GCOV_PATH gcov )
find_program( LCOV_PATH NAMES lcov lcov.bat lcov.exe lcov.perl)
find_program( GENHTML_PATH NAMES genhtml genhtml.perl genhtml.bat )
find_program( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/scripts/test)
find_program( CPPFILT_PATH NAMES c++filt )
if(NOT GCOV_PATH)
message(FATAL_ERROR "gcov not found! Aborting...")
endif() # NOT GCOV_PATH
message("foo ${CMAKE_CXX_COMPILER_ID}")
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang")
if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 3)
message(FATAL_ERROR "Clang version must be 3.0.0 or greater! Aborting...")
endif()
elseif(NOT CMAKE_COMPILER_IS_GNUCXX)
if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "[Ff]lang")
# Do nothing; exit conditional without error if true
elseif("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
# Do nothing; exit conditional without error if true
else()
message(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
endif()
endif()
set(COVERAGE_COMPILER_FLAGS "-g -fprofile-arcs -ftest-coverage"
CACHE INTERNAL "")
set(CMAKE_Fortran_FLAGS_COVERAGE
${COVERAGE_COMPILER_FLAGS}
CACHE STRING "Flags used by the Fortran compiler during coverage builds."
FORCE )
set(CMAKE_CXX_FLAGS_COVERAGE
${COVERAGE_COMPILER_FLAGS}
CACHE STRING "Flags used by the C++ compiler during coverage builds."
FORCE )
set(CMAKE_C_FLAGS_COVERAGE
${COVERAGE_COMPILER_FLAGS}
CACHE STRING "Flags used by the C compiler during coverage builds."
FORCE )
set(CMAKE_EXE_LINKER_FLAGS_COVERAGE
""
CACHE STRING "Flags used for linking binaries during coverage builds."
FORCE )
set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
""
CACHE STRING "Flags used by the shared libraries linker during coverage builds."
FORCE )
mark_as_advanced(
CMAKE_Fortran_FLAGS_COVERAGE
CMAKE_CXX_FLAGS_COVERAGE
CMAKE_C_FLAGS_COVERAGE
CMAKE_EXE_LINKER_FLAGS_COVERAGE
CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
message(WARNING "Code coverage results with an optimised (non-Debug) build may be misleading")
endif() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
link_libraries(gcov)
endif()
# Defines a target for running and collection code coverage information
# Builds dependencies, runs the given executable and outputs reports.
# NOTE! The executable should always have a ZERO as exit code otherwise
# the coverage generation will not complete.
#
# setup_target_for_coverage_lcov(
# NAME testrunner_coverage # New target name
# EXECUTABLE testrunner -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR
# DEPENDENCIES testrunner # Dependencies to build first
# BASE_DIRECTORY "../" # Base directory for report
# # (defaults to PROJECT_SOURCE_DIR)
# EXCLUDE "src/dir1/*" "src/dir2/*" # Patterns to exclude (can be relative
# # to BASE_DIRECTORY, with CMake 3.4+)
# NO_DEMANGLE # Don't demangle C++ symbols
# # even if c++filt is found
# )
function(setup_target_for_coverage_lcov)
set(options NO_DEMANGLE)
set(oneValueArgs BASE_DIRECTORY NAME)
set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES LCOV_ARGS GENHTML_ARGS)
cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT LCOV_PATH)
message(FATAL_ERROR "lcov not found! Aborting...")
endif() # NOT LCOV_PATH
if(NOT GENHTML_PATH)
message(FATAL_ERROR "genhtml not found! Aborting...")
endif() # NOT GENHTML_PATH
# Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR
if(${Coverage_BASE_DIRECTORY})
get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)
else()
set(BASEDIR ${PROJECT_SOURCE_DIR})
endif()
# Collect excludes (CMake 3.4+: Also compute absolute paths)
set(LCOV_EXCLUDES "")
foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_LCOV_EXCLUDES})
if(CMAKE_VERSION VERSION_GREATER 3.4)
get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR})
endif()
list(APPEND LCOV_EXCLUDES "${EXCLUDE}")
endforeach()
list(REMOVE_DUPLICATES LCOV_EXCLUDES)
# Conditional arguments
if(CPPFILT_PATH AND NOT ${Coverage_NO_DEMANGLE})
set(GENHTML_EXTRA_ARGS "--demangle-cpp")
endif()
# Setup target
add_custom_target(${Coverage_NAME}
# Cleanup lcov
COMMAND ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -directory . -b ${BASEDIR} --zerocounters
# Create baseline to make sure untouched files show up in the report
COMMAND ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -c -i -d . -b ${BASEDIR} -o ${Coverage_NAME}.base
# Run tests
COMMAND ${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS}
# Capturing lcov counters and generating report
COMMAND ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} --directory . -b ${BASEDIR} --capture --output-file ${Coverage_NAME}.capture
# add baseline counters
COMMAND ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -a ${Coverage_NAME}.base -a ${Coverage_NAME}.capture --output-file ${Coverage_NAME}.total
# filter collected data to final coverage report
COMMAND ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} --remove ${Coverage_NAME}.total ${LCOV_EXCLUDES} --output-file ${Coverage_NAME}.info
# Generate HTML output
COMMAND ${GENHTML_PATH} ${GENHTML_EXTRA_ARGS} ${Coverage_GENHTML_ARGS} -o ${Coverage_NAME} ${Coverage_NAME}.info
# Set output files as GENERATED (will be removed on 'make clean')
BYPRODUCTS
${Coverage_NAME}.base
${Coverage_NAME}.capture
${Coverage_NAME}.total
${Coverage_NAME}.info
${Coverage_NAME} # report directory
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
DEPENDS ${Coverage_DEPENDENCIES}
VERBATIM # Protect arguments to commands
COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
)
# Show where to find the lcov info report
add_custom_command(TARGET ${Coverage_NAME} POST_BUILD
COMMAND ;
COMMENT "Lcov code coverage info report saved in ${Coverage_NAME}.info."
)
# Show info where to find the report
add_custom_command(TARGET ${Coverage_NAME} POST_BUILD
COMMAND ;
COMMENT "Open ./${Coverage_NAME}/index.html in your browser to view the coverage report."
)
endfunction() # setup_target_for_coverage_lcov
# Defines a target for running and collection code coverage information
# Builds dependencies, runs the given executable and outputs reports.
# NOTE! The executable should always have a ZERO as exit code otherwise
# the coverage generation will not complete.
#
# setup_target_for_coverage_gcovr_xml(
# NAME ctest_coverage # New target name
# EXECUTABLE ctest -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR
# DEPENDENCIES executable_target # Dependencies to build first
# BASE_DIRECTORY "../" # Base directory for report
# # (defaults to PROJECT_SOURCE_DIR)
# EXCLUDE "src/dir1/*" "src/dir2/*" # Patterns to exclude (can be relative
# # to BASE_DIRECTORY, with CMake 3.4+)
# )
function(setup_target_for_coverage_gcovr_xml)
set(options NONE)
set(oneValueArgs BASE_DIRECTORY NAME)
set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES)
cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT GCOVR_PATH)
message(FATAL_ERROR "gcovr not found! Aborting...")
endif() # NOT GCOVR_PATH
# Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR
if(${Coverage_BASE_DIRECTORY})
get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)
else()
set(BASEDIR ${PROJECT_SOURCE_DIR})
endif()
# Collect excludes (CMake 3.4+: Also compute absolute paths)
set(GCOVR_EXCLUDES "")
foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_GCOVR_EXCLUDES})
if(CMAKE_VERSION VERSION_GREATER 3.4)
get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR})
endif()
list(APPEND GCOVR_EXCLUDES "${EXCLUDE}")
endforeach()
list(REMOVE_DUPLICATES GCOVR_EXCLUDES)
# Combine excludes to several -e arguments
set(GCOVR_EXCLUDE_ARGS "")
foreach(EXCLUDE ${GCOVR_EXCLUDES})
list(APPEND GCOVR_EXCLUDE_ARGS "-e")
list(APPEND GCOVR_EXCLUDE_ARGS "${EXCLUDE}")
endforeach()
add_custom_target(${Coverage_NAME}
# Run tests
${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS}
# Running gcovr
COMMAND ${GCOVR_PATH} --xml
-r ${BASEDIR} ${GCOVR_EXCLUDE_ARGS}
--object-directory=${PROJECT_BINARY_DIR}
-o ${Coverage_NAME}.xml
BYPRODUCTS ${Coverage_NAME}.xml
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
DEPENDS ${Coverage_DEPENDENCIES}
VERBATIM # Protect arguments to commands
COMMENT "Running gcovr to produce Cobertura code coverage report."
)
# Show info where to find the report
add_custom_command(TARGET ${Coverage_NAME} POST_BUILD
COMMAND ;
COMMENT "Cobertura code coverage report saved in ${Coverage_NAME}.xml."
)
endfunction() # setup_target_for_coverage_gcovr_xml
# Defines a target for running and collection code coverage information
# Builds dependencies, runs the given executable and outputs reports.
# NOTE! The executable should always have a ZERO as exit code otherwise
# the coverage generation will not complete.
#
# setup_target_for_coverage_gcovr_html(
# NAME ctest_coverage # New target name
# EXECUTABLE ctest -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR
# DEPENDENCIES executable_target # Dependencies to build first
# BASE_DIRECTORY "../" # Base directory for report
# # (defaults to PROJECT_SOURCE_DIR)
# EXCLUDE "src/dir1/*" "src/dir2/*" # Patterns to exclude (can be relative
# # to BASE_DIRECTORY, with CMake 3.4+)
# )
function(setup_target_for_coverage_gcovr_html)
set(options NONE)
set(oneValueArgs BASE_DIRECTORY NAME)
set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES)
cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT GCOVR_PATH)
message(FATAL_ERROR "gcovr not found! Aborting...")
endif() # NOT GCOVR_PATH
# Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR
if(${Coverage_BASE_DIRECTORY})
get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)
else()
set(BASEDIR ${PROJECT_SOURCE_DIR})
endif()
# Collect excludes (CMake 3.4+: Also compute absolute paths)
set(GCOVR_EXCLUDES "")
foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_GCOVR_EXCLUDES})
if(CMAKE_VERSION VERSION_GREATER 3.4)
get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR})
endif()
list(APPEND GCOVR_EXCLUDES "${EXCLUDE}")
endforeach()
list(REMOVE_DUPLICATES GCOVR_EXCLUDES)
# Combine excludes to several -e arguments
set(GCOVR_EXCLUDE_ARGS "")
foreach(EXCLUDE ${GCOVR_EXCLUDES})
list(APPEND GCOVR_EXCLUDE_ARGS "-e")
list(APPEND GCOVR_EXCLUDE_ARGS "${EXCLUDE}")
endforeach()
add_custom_target(${Coverage_NAME}
# Run tests
${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS}
# Create folder
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/${Coverage_NAME}
# Running gcovr
COMMAND ${GCOVR_PATH} --html --html-details
-r ${BASEDIR} ${GCOVR_EXCLUDE_ARGS}
--object-directory=${PROJECT_BINARY_DIR}
-o ${Coverage_NAME}/index.html
BYPRODUCTS ${PROJECT_BINARY_DIR}/${Coverage_NAME} # report directory
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
DEPENDS ${Coverage_DEPENDENCIES}
VERBATIM # Protect arguments to commands
COMMENT "Running gcovr to produce HTML code coverage report."
)
# Show info where to find the report
add_custom_command(TARGET ${Coverage_NAME} POST_BUILD
COMMAND ;
COMMENT "Open ./${Coverage_NAME}/index.html in your browser to view the coverage report."
)
endfunction() # setup_target_for_coverage_gcovr_html
function(append_coverage_compiler_flags)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
message(STATUS "Appending code coverage compiler flags: ${COVERAGE_COMPILER_FLAGS}")
endfunction() # append_coverage_compiler_flags

14
cmake/Hunter/config.cmake Normal file
View File

@ -0,0 +1,14 @@
hunter_config(
libpcre
VERSION 8.41
CMAKE_ARGS
EXTRA_FLAGS=--enable-unicode-properties --enable-jit --enable-utf
)
hunter_config(
readline
VERSION 6.3
CMAKE_ARGS
EXTRA_FLAGS=CFLAGS=-Wno-implicit-function-declaration
)

528
cmake/HunterGate.cmake Normal file
View File

@ -0,0 +1,528 @@
# Copyright (c) 2013-2019, Ruslan Baratov
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# This is a gate file to Hunter package manager.
# Include this file using `include` command and add package you need, example:
#
# cmake_minimum_required(VERSION 3.2)
#
# include("cmake/HunterGate.cmake")
# HunterGate(
# URL "https://github.com/path/to/hunter/archive.tar.gz"
# SHA1 "798501e983f14b28b10cda16afa4de69eee1da1d"
# )
#
# project(MyProject)
#
# hunter_add_package(Foo)
# hunter_add_package(Boo COMPONENTS Bar Baz)
#
# Projects:
# * https://github.com/hunter-packages/gate/
# * https://github.com/ruslo/hunter
option(HUNTER_ENABLED "Enable Hunter package manager support" ON)
if(HUNTER_ENABLED)
if(CMAKE_VERSION VERSION_LESS "3.2")
message(
FATAL_ERROR
"At least CMake version 3.2 required for Hunter dependency management."
" Update CMake or set HUNTER_ENABLED to OFF."
)
endif()
endif()
include(CMakeParseArguments) # cmake_parse_arguments
option(HUNTER_STATUS_PRINT "Print working status" ON)
option(HUNTER_STATUS_DEBUG "Print a lot info" OFF)
option(HUNTER_TLS_VERIFY "Enable/disable TLS certificate checking on downloads" ON)
set(HUNTER_ERROR_PAGE "https://docs.hunter.sh/en/latest/reference/errors")
function(hunter_gate_status_print)
if(HUNTER_STATUS_PRINT OR HUNTER_STATUS_DEBUG)
foreach(print_message ${ARGV})
message(STATUS "[hunter] ${print_message}")
endforeach()
endif()
endfunction()
function(hunter_gate_status_debug)
if(HUNTER_STATUS_DEBUG)
foreach(print_message ${ARGV})
string(TIMESTAMP timestamp)
message(STATUS "[hunter *** DEBUG *** ${timestamp}] ${print_message}")
endforeach()
endif()
endfunction()
function(hunter_gate_error_page error_page)
message("------------------------------ ERROR ------------------------------")
message(" ${HUNTER_ERROR_PAGE}/${error_page}.html")
message("-------------------------------------------------------------------")
message("")
message(FATAL_ERROR "")
endfunction()
function(hunter_gate_internal_error)
message("")
foreach(print_message ${ARGV})
message("[hunter ** INTERNAL **] ${print_message}")
endforeach()
message("[hunter ** INTERNAL **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
message("")
hunter_gate_error_page("error.internal")
endfunction()
function(hunter_gate_fatal_error)
cmake_parse_arguments(hunter "" "ERROR_PAGE" "" "${ARGV}")
if("${hunter_ERROR_PAGE}" STREQUAL "")
hunter_gate_internal_error("Expected ERROR_PAGE")
endif()
message("")
foreach(x ${hunter_UNPARSED_ARGUMENTS})
message("[hunter ** FATAL ERROR **] ${x}")
endforeach()
message("[hunter ** FATAL ERROR **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
message("")
hunter_gate_error_page("${hunter_ERROR_PAGE}")
endfunction()
function(hunter_gate_user_error)
hunter_gate_fatal_error(${ARGV} ERROR_PAGE "error.incorrect.input.data")
endfunction()
function(hunter_gate_self root version sha1 result)
string(COMPARE EQUAL "${root}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("root is empty")
endif()
string(COMPARE EQUAL "${version}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("version is empty")
endif()
string(COMPARE EQUAL "${sha1}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("sha1 is empty")
endif()
string(SUBSTRING "${sha1}" 0 7 archive_id)
set(
hunter_self
"${root}/_Base/Download/Hunter/${version}/${archive_id}/Unpacked"
)
set("${result}" "${hunter_self}" PARENT_SCOPE)
endfunction()
# Set HUNTER_GATE_ROOT cmake variable to suitable value.
function(hunter_gate_detect_root)
# Check CMake variable
string(COMPARE NOTEQUAL "${HUNTER_ROOT}" "" not_empty)
if(not_empty)
set(HUNTER_GATE_ROOT "${HUNTER_ROOT}" PARENT_SCOPE)
hunter_gate_status_debug("HUNTER_ROOT detected by cmake variable")
return()
endif()
# Check environment variable
string(COMPARE NOTEQUAL "$ENV{HUNTER_ROOT}" "" not_empty)
if(not_empty)
set(HUNTER_GATE_ROOT "$ENV{HUNTER_ROOT}" PARENT_SCOPE)
hunter_gate_status_debug("HUNTER_ROOT detected by environment variable")
return()
endif()
# Check HOME environment variable
string(COMPARE NOTEQUAL "$ENV{HOME}" "" result)
if(result)
set(HUNTER_GATE_ROOT "$ENV{HOME}/.hunter" PARENT_SCOPE)
hunter_gate_status_debug("HUNTER_ROOT set using HOME environment variable")
return()
endif()
# Check SYSTEMDRIVE and USERPROFILE environment variable (windows only)
if(WIN32)
string(COMPARE NOTEQUAL "$ENV{SYSTEMDRIVE}" "" result)
if(result)
set(HUNTER_GATE_ROOT "$ENV{SYSTEMDRIVE}/.hunter" PARENT_SCOPE)
hunter_gate_status_debug(
"HUNTER_ROOT set using SYSTEMDRIVE environment variable"
)
return()
endif()
string(COMPARE NOTEQUAL "$ENV{USERPROFILE}" "" result)
if(result)
set(HUNTER_GATE_ROOT "$ENV{USERPROFILE}/.hunter" PARENT_SCOPE)
hunter_gate_status_debug(
"HUNTER_ROOT set using USERPROFILE environment variable"
)
return()
endif()
endif()
hunter_gate_fatal_error(
"Can't detect HUNTER_ROOT"
ERROR_PAGE "error.detect.hunter.root"
)
endfunction()
function(hunter_gate_download dir)
string(
COMPARE
NOTEQUAL
"$ENV{HUNTER_DISABLE_AUTOINSTALL}"
""
disable_autoinstall
)
if(disable_autoinstall AND NOT HUNTER_RUN_INSTALL)
hunter_gate_fatal_error(
"Hunter not found in '${dir}'"
"Set HUNTER_RUN_INSTALL=ON to auto-install it from '${HUNTER_GATE_URL}'"
"Settings:"
" HUNTER_ROOT: ${HUNTER_GATE_ROOT}"
" HUNTER_SHA1: ${HUNTER_GATE_SHA1}"
ERROR_PAGE "error.run.install"
)
endif()
string(COMPARE EQUAL "${dir}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("Empty 'dir' argument")
endif()
string(COMPARE EQUAL "${HUNTER_GATE_SHA1}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("HUNTER_GATE_SHA1 empty")
endif()
string(COMPARE EQUAL "${HUNTER_GATE_URL}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("HUNTER_GATE_URL empty")
endif()
set(done_location "${dir}/DONE")
set(sha1_location "${dir}/SHA1")
set(build_dir "${dir}/Build")
set(cmakelists "${dir}/CMakeLists.txt")
hunter_gate_status_debug("Locking directory: ${dir}")
file(LOCK "${dir}" DIRECTORY GUARD FUNCTION)
hunter_gate_status_debug("Lock done")
if(EXISTS "${done_location}")
# while waiting for lock other instance can do all the job
hunter_gate_status_debug("File '${done_location}' found, skip install")
return()
endif()
file(REMOVE_RECURSE "${build_dir}")
file(REMOVE_RECURSE "${cmakelists}")
file(MAKE_DIRECTORY "${build_dir}") # check directory permissions
# Disabling languages speeds up a little bit, reduces noise in the output
# and avoids path too long windows error
file(
WRITE
"${cmakelists}"
"cmake_minimum_required(VERSION 3.2)\n"
"project(HunterDownload LANGUAGES NONE)\n"
"include(ExternalProject)\n"
"ExternalProject_Add(\n"
" Hunter\n"
" URL\n"
" \"${HUNTER_GATE_URL}\"\n"
" URL_HASH\n"
" SHA1=${HUNTER_GATE_SHA1}\n"
" DOWNLOAD_DIR\n"
" \"${dir}\"\n"
" TLS_VERIFY\n"
" ${HUNTER_TLS_VERIFY}\n"
" SOURCE_DIR\n"
" \"${dir}/Unpacked\"\n"
" CONFIGURE_COMMAND\n"
" \"\"\n"
" BUILD_COMMAND\n"
" \"\"\n"
" INSTALL_COMMAND\n"
" \"\"\n"
")\n"
)
if(HUNTER_STATUS_DEBUG)
set(logging_params "")
else()
set(logging_params OUTPUT_QUIET)
endif()
hunter_gate_status_debug("Run generate")
# Need to add toolchain file too.
# Otherwise on Visual Studio + MDD this will fail with error:
# "Could not find an appropriate version of the Windows 10 SDK installed on this machine"
if(EXISTS "${CMAKE_TOOLCHAIN_FILE}")
get_filename_component(absolute_CMAKE_TOOLCHAIN_FILE "${CMAKE_TOOLCHAIN_FILE}" ABSOLUTE)
set(toolchain_arg "-DCMAKE_TOOLCHAIN_FILE=${absolute_CMAKE_TOOLCHAIN_FILE}")
else()
# 'toolchain_arg' can't be empty
set(toolchain_arg "-DCMAKE_TOOLCHAIN_FILE=")
endif()
string(COMPARE EQUAL "${CMAKE_MAKE_PROGRAM}" "" no_make)
if(no_make)
set(make_arg "")
else()
# Test case: remove Ninja from PATH but set it via CMAKE_MAKE_PROGRAM
set(make_arg "-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}")
endif()
execute_process(
COMMAND
"${CMAKE_COMMAND}"
"-H${dir}"
"-B${build_dir}"
"-G${CMAKE_GENERATOR}"
"${toolchain_arg}"
${make_arg}
WORKING_DIRECTORY "${dir}"
RESULT_VARIABLE download_result
${logging_params}
)
if(NOT download_result EQUAL 0)
hunter_gate_internal_error(
"Configure project failed."
"To reproduce the error run: ${CMAKE_COMMAND} -H${dir} -B${build_dir} -G${CMAKE_GENERATOR} ${toolchain_arg} ${make_arg}"
"In directory ${dir}"
)
endif()
hunter_gate_status_print(
"Initializing Hunter workspace (${HUNTER_GATE_SHA1})"
" ${HUNTER_GATE_URL}"
" -> ${dir}"
)
execute_process(
COMMAND "${CMAKE_COMMAND}" --build "${build_dir}"
WORKING_DIRECTORY "${dir}"
RESULT_VARIABLE download_result
${logging_params}
)
if(NOT download_result EQUAL 0)
hunter_gate_internal_error("Build project failed")
endif()
file(REMOVE_RECURSE "${build_dir}")
file(REMOVE_RECURSE "${cmakelists}")
file(WRITE "${sha1_location}" "${HUNTER_GATE_SHA1}")
file(WRITE "${done_location}" "DONE")
hunter_gate_status_debug("Finished")
endfunction()
# Must be a macro so master file 'cmake/Hunter' can
# apply all variables easily just by 'include' command
# (otherwise PARENT_SCOPE magic needed)
macro(HunterGate)
if(HUNTER_GATE_DONE)
# variable HUNTER_GATE_DONE set explicitly for external project
# (see `hunter_download`)
set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)
endif()
# First HunterGate command will init Hunter, others will be ignored
get_property(_hunter_gate_done GLOBAL PROPERTY HUNTER_GATE_DONE SET)
if(NOT HUNTER_ENABLED)
# Empty function to avoid error "unknown function"
function(hunter_add_package)
endfunction()
set(
_hunter_gate_disabled_mode_dir
"${CMAKE_CURRENT_LIST_DIR}/cmake/Hunter/disabled-mode"
)
if(EXISTS "${_hunter_gate_disabled_mode_dir}")
hunter_gate_status_debug(
"Adding \"disabled-mode\" modules: ${_hunter_gate_disabled_mode_dir}"
)
list(APPEND CMAKE_PREFIX_PATH "${_hunter_gate_disabled_mode_dir}")
endif()
elseif(_hunter_gate_done)
hunter_gate_status_debug("Secondary HunterGate (use old settings)")
hunter_gate_self(
"${HUNTER_CACHED_ROOT}"
"${HUNTER_VERSION}"
"${HUNTER_SHA1}"
_hunter_self
)
include("${_hunter_self}/cmake/Hunter")
else()
set(HUNTER_GATE_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}")
string(COMPARE NOTEQUAL "${PROJECT_NAME}" "" _have_project_name)
if(_have_project_name)
hunter_gate_fatal_error(
"Please set HunterGate *before* 'project' command. "
"Detected project: ${PROJECT_NAME}"
ERROR_PAGE "error.huntergate.before.project"
)
endif()
cmake_parse_arguments(
HUNTER_GATE "LOCAL" "URL;SHA1;GLOBAL;FILEPATH" "" ${ARGV}
)
string(COMPARE EQUAL "${HUNTER_GATE_SHA1}" "" _empty_sha1)
string(COMPARE EQUAL "${HUNTER_GATE_URL}" "" _empty_url)
string(
COMPARE
NOTEQUAL
"${HUNTER_GATE_UNPARSED_ARGUMENTS}"
""
_have_unparsed
)
string(COMPARE NOTEQUAL "${HUNTER_GATE_GLOBAL}" "" _have_global)
string(COMPARE NOTEQUAL "${HUNTER_GATE_FILEPATH}" "" _have_filepath)
if(_have_unparsed)
hunter_gate_user_error(
"HunterGate unparsed arguments: ${HUNTER_GATE_UNPARSED_ARGUMENTS}"
)
endif()
if(_empty_sha1)
hunter_gate_user_error("SHA1 suboption of HunterGate is mandatory")
endif()
if(_empty_url)
hunter_gate_user_error("URL suboption of HunterGate is mandatory")
endif()
if(_have_global)
if(HUNTER_GATE_LOCAL)
hunter_gate_user_error("Unexpected LOCAL (already has GLOBAL)")
endif()
if(_have_filepath)
hunter_gate_user_error("Unexpected FILEPATH (already has GLOBAL)")
endif()
endif()
if(HUNTER_GATE_LOCAL)
if(_have_global)
hunter_gate_user_error("Unexpected GLOBAL (already has LOCAL)")
endif()
if(_have_filepath)
hunter_gate_user_error("Unexpected FILEPATH (already has LOCAL)")
endif()
endif()
if(_have_filepath)
if(_have_global)
hunter_gate_user_error("Unexpected GLOBAL (already has FILEPATH)")
endif()
if(HUNTER_GATE_LOCAL)
hunter_gate_user_error("Unexpected LOCAL (already has FILEPATH)")
endif()
endif()
hunter_gate_detect_root() # set HUNTER_GATE_ROOT
# Beautify path, fix probable problems with windows path slashes
get_filename_component(
HUNTER_GATE_ROOT "${HUNTER_GATE_ROOT}" ABSOLUTE
)
hunter_gate_status_debug("HUNTER_ROOT: ${HUNTER_GATE_ROOT}")
if(NOT HUNTER_ALLOW_SPACES_IN_PATH)
string(FIND "${HUNTER_GATE_ROOT}" " " _contain_spaces)
if(NOT _contain_spaces EQUAL -1)
hunter_gate_fatal_error(
"HUNTER_ROOT (${HUNTER_GATE_ROOT}) contains spaces."
"Set HUNTER_ALLOW_SPACES_IN_PATH=ON to skip this error"
"(Use at your own risk!)"
ERROR_PAGE "error.spaces.in.hunter.root"
)
endif()
endif()
string(
REGEX
MATCH
"[0-9]+\\.[0-9]+\\.[0-9]+[-_a-z0-9]*"
HUNTER_GATE_VERSION
"${HUNTER_GATE_URL}"
)
string(COMPARE EQUAL "${HUNTER_GATE_VERSION}" "" _is_empty)
if(_is_empty)
set(HUNTER_GATE_VERSION "unknown")
endif()
hunter_gate_self(
"${HUNTER_GATE_ROOT}"
"${HUNTER_GATE_VERSION}"
"${HUNTER_GATE_SHA1}"
_hunter_self
)
set(_master_location "${_hunter_self}/cmake/Hunter")
get_filename_component(_archive_id_location "${_hunter_self}/.." ABSOLUTE)
set(_done_location "${_archive_id_location}/DONE")
set(_sha1_location "${_archive_id_location}/SHA1")
# Check Hunter already downloaded by HunterGate
if(NOT EXISTS "${_done_location}")
hunter_gate_download("${_archive_id_location}")
endif()
if(NOT EXISTS "${_done_location}")
hunter_gate_internal_error("hunter_gate_download failed")
endif()
if(NOT EXISTS "${_sha1_location}")
hunter_gate_internal_error("${_sha1_location} not found")
endif()
file(READ "${_sha1_location}" _sha1_value)
string(COMPARE EQUAL "${_sha1_value}" "${HUNTER_GATE_SHA1}" _is_equal)
if(NOT _is_equal)
hunter_gate_internal_error(
"Short SHA1 collision:"
" ${_sha1_value} (from ${_sha1_location})"
" ${HUNTER_GATE_SHA1} (HunterGate)"
)
endif()
if(NOT EXISTS "${_master_location}")
hunter_gate_user_error(
"Master file not found:"
" ${_master_location}"
"try to update Hunter/HunterGate"
)
endif()
include("${_master_location}")
set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)
endif()
endmacro()

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.8.4],[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])
@ -7,35 +7,52 @@ AM_SILENT_RULES([yes])
AC_PREFIX_DEFAULT(/usr)
AC_CANONICAL_HOST
AX_PROG_CC_FOR_BUILD
AX_PTHREAD()
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"
AC_LANG(C++)
AX_CXX_COMPILE_STDCXX_14([noext], [mandatory])
for defdir in /opt/local /usr/local; do
if test -d "$defdir/include"; then
CPPFLAGS="$CPPFLAGS -I$defdir/include"
fi
done
AC_ARG_ENABLE(
[system-paths],
AS_HELP_STRING([--disable-system-paths],
[Add extra system paths]),,[enable_system_paths=yes])
for defdir in /opt/local /usr/local /usr /; do
if test x"${enable_system_paths}" != x"no"; then
for defdir in /opt/local /usr/local; do
if test -d "$defdir/include"; then
echo "Adding include path: $defdir/include"
CPPFLAGS="$CPPFLAGS -I$defdir/include"
fi
done
if test -d "$defdir/lib64"; then
LDFLAGS="$LDFLAGS -L$defdir/lib64"
fi
if test -d "$defdir/lib"; then
LDFLAGS="$LDFLAGS -L$defdir/lib"
fi
for defdir in /opt/local /usr/local /usr /; do
if test -d "$defdir/lib/x86_64-linux-gnu"; then
LDFLAGS="$LDFLAGS -L$defdir/lib/x86_64-linux-gnu"
fi
done
if test -d "$defdir/lib64"; then
LDFLAGS="$LDFLAGS -L$defdir/lib64"
fi
if test -d "$defdir/lib"; then
LDFLAGS="$LDFLAGS -L$defdir/lib"
fi
if test -d "$defdir/lib/x86_64-linux-gnu"; then
LDFLAGS="$LDFLAGS -L$defdir/lib/x86_64-linux-gnu"
fi
done
else
echo "Not including extra system paths"
fi
dnl abssrcdir is the absolute path to the source base (regardless of where
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)
@ -65,6 +82,8 @@ AC_PROG_MAKE_SET
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)
@ -72,8 +91,8 @@ AC_CHECK_SIZEOF(size_t)
AC_STRUCT_TIMEZONE
AC_ARG_ENABLE([static],
AS_HELP_STRING([--disable-static],
[Disable static linking]))
AS_HELP_STRING([--enable-static],
[Enable static linking]))
AC_SEARCH_LIBS(openpty, util)
AC_SEARCH_LIBS(gzseek, z, [], [AC_MSG_ERROR([libz required to build])])
@ -83,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], [], [], [test x"${enable_static}" != x"no"])
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],
@ -95,7 +114,7 @@ AC_ARG_ENABLE([tinfo],
AS_IF([test "x${enable_tinfo}" != "xno"],
[dnl
AC_MSG_NOTICE([Trying to link with tinfo])
AC_SEARCH_LIBS(cur_term, tinfo,
AC_SEARCH_LIBS(cur_term, [tinfow tinfo],
AC_MSG_NOTICE([Linking with tinfo]),
AC_MSG_WARN([libtinfo not found])
)
@ -117,7 +136,42 @@ AS_CASE(["$host_os"],
)
)
AC_CHECK_HEADERS(execinfo.h pty.h util.h zlib.h bzlib.h libutil.h sys/ttydefaults.h x86intrin.h)
AC_CHECK_HEADERS(execinfo.h pty.h util.h zlib.h bzlib.h libutil.h sys/ttydefaults.h)
dnl Experimental SIMD features.
AC_ARG_ENABLE([simd],
AS_HELP_STRING([--enable-simd], [Try and enable simd optimizations]),
[
AS_CASE(["$enable_simd"],
[no], [enable_simd="no"],
[yes | ""],[enable_simd="yes"])
],
[]
)
AS_IF([test "x$enable_simd" = "xyes"], [
AC_CHECK_HEADERS(x86intrin.h)
])
AC_ARG_WITH([system_doctest],
AS_HELP_STRING(
[--with-system-doctest],
[Use the system provided doctest library rather than the bundled one]
),
[], []
)
AS_IF([test "x$with_system_doctest" = "xyes"], [
AC_CHECK_HEADERS(doctest/doctest.h)
AS_IF([test "x$ac_cv_header_doctest_doctest_h" != "xyes"], [
AC_MSG_ERROR([system doctest not found])dnl
])
])
AS_IF([test "x$with_system_doctest" != "xyes"], [
CPPFLAGS="-I\$(top_srcdir)/src/third-party/doctest-root $CPPFLAGS"
])
LNAV_WITH_JEMALLOC
@ -129,9 +183,12 @@ AS_VAR_IF([ax_cv_curses],[yes],[],
AC_MSG_ERROR([requires an X/Open-compatible Curses library with color])dnl
)
AX_PATH_LIB_PCRE([], [AC_MSG_ERROR([pcre required to build])])
AX_PATH_LIB_ARCHIVE
AX_CHECK_PCRE2([8], [], [AC_MSG_ERROR([pcre2 is required to build])])
AX_PATH_LIB_READLINE
AX_CODE_COVERAGE
LNAV_WITH_SQLITE3("3.9.0")
dnl case "$host_os" in
@ -144,16 +201,22 @@ dnl esac
AC_DEFINE([_XOPEN_SOURCE_EXTENDED], [1], [Wide character support for ncurses])
AS_VAR_SET(ALL_LDFLAGS, "$SQLITE3_LDFLAGS $READLINE_LDFLAGS $LDFLAGS")
AS_VAR_SET(ALL_LDFLAGS, "$SQLITE3_LDFLAGS $READLINE_LDFLAGS $LIBARCHIVE_LDFLAGS $LIBCURL $LDFLAGS")
AS_VAR_SET(static_lib_list,
["libncurses.a libncursesw.a libreadline.a libsqlite3.a libz.a libtinfo.a"])
["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 libpcrecpp.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,
["$static_lib_list libnghttp2.a liblzma.a libcrypto.a libzstd.a libldap.a"])
AS_VAR_SET(static_lib_list,
["$static_lib_list libarchive.a libidn2.a libgssapi_krb5.a libbrotlidec-static.a"])
AS_VAR_SET(static_lib_list,
["$static_lib_list librtmp.a libiconv.a liblz4.a liblber.a libunistring.a"])
if test x"${enable_static}" != x"no"; then
if test x"${enable_static}" = x"yes"; then
case "$host_os" in
darwin*)
STATIC_LDFLAGS="$STATIC_LDFLAGS -Wl,-search_paths_first"
@ -162,7 +225,9 @@ if test x"${enable_static}" != x"no"; then
AX_CHECK_LINK_FLAG([-static-libgcc], [STATIC_LDFLAGS="$STATIC_LDFLAGS -static-libgcc"])
STATIC_LDFLAGS="$STATIC_LDFLAGS -L`pwd`/src/static-libs -static-libstdc++"
STATIC_LDFLAGS="$STATIC_LDFLAGS -L`pwd`/src/static-libs"
AX_CHECK_LINK_FLAG([-static-libstdc++],
[STATIC_LDFLAGS="$STATIC_LDFLAGS -static-libstdc++"])
# This is a hack to link against static libraries instead of shared
# so that we can build a mostly statically link exe that can
# be downloaded and used right away. This is required for OS X and
@ -241,11 +306,26 @@ AS_IF([test $? -eq 0],
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])
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/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)))

5
docs/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor

58
docs/02_downloads.md Normal file
View File

@ -0,0 +1,58 @@
---
layout: page
title: Downloads
permalink: /downloads
---
The latest **stable** release is [**v{{ site.version }}**](https://github.com/tstack/lnav/releases/latest).
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}}-x86_64-linux-musl.zip).
Install from the [Snap Store](https://snapcraft.io/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}}-x86_64-macos.zip)
Install using [Homebrew](https://formulae.brew.sh/formula/lnav):
```console
$ brew install lnav
```
## Source
<!-- markdown-link-check-disable-next-line -->
Download the [source](https://github.com/tstack/lnav/releases/download/v{{site.version}}/lnav-{{site.version}}.tar.gz)
and install any dependencies. The following commands will unpack the source
tar ball, configure the build for your system, build, and then 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)

140
docs/03_features.md Normal file
View File

@ -0,0 +1,140 @@
---
layout: page
title: Features
permalink: /features
---
* TOC
{:toc}
## Single Log View
All log file contents are merged into a single view based on message timestamps.
You no longer need to manually correlate timestamps across multiple windows or
figure out the order in which to view rotated log files. The color bars on the
left-hand side help to show which file a message belongs to.
![Screenshot of lnav showing messages from multiple files](/assets/images/lnav-multi-file2.png)
## Automatic Log Format Detection
The log message format is automatically determined by lnav while scanning your
files. The following formats are built in by default:
* Common Web Access Log format
* CUPS page_log
* Syslog
* Glog
* VMware ESXi/vCenter Logs
* dpkg.log
* uwsgi
* "Generic" - Any message that starts with a timestamp
* Strace
* sudo
GZIP'ed and BZIP2'ed files are also detected automatically and decompressed on-the-fly.
## Filters
Display only lines that match or do not match a set of regular expressions.
Useful for removing extraneous log lines that you are not interested in.
## Timeline View
The timeline view shows a histogram of messages over time. The number of
warnings and errors are highlighted in the display so that you can easily see
where problems have occurred. Once you have found a period of time that is of
interest, a key-press will take you back to the log message view at the
corresponding time.
![Screenshot of timeline view](/assets/images/lnav-hist.png)
## Pretty-Print View
The pretty-print view will reformat structured data, like XML or JSON, so that
it is easier to read. Simply press SHIFT+P in the log view to have all the
currently displayed lines pretty-printed.
The following screenshot shows an XML blob with no indentation:
![A flat blob of XML](/assets/images/lnav-before-pretty.png)
After pressing SHIFT+P, the XML is pretty-printed for easier viewing:
![A pretty-printed blob of XML](/assets/images/lnav-after-pretty.png)
## Query Logs Using SQL
Log files are directly used as the backing for SQLite virtual tables. This
means you can perform queries on messages without having to load the data into
an SQL database. For example, the screenshot below shows the result of
running the following query against an Apache access_log file:
```sql
SELECT c_ip, count(*), sum(sc_bytes) AS total FROM access_log
GROUP BY c_ip ORDER BY total DESC;
```
![The results of a SQL query](/assets/images/lnav-query.png)
## "Live" Operation
Searches are done as you type; new log lines are automatically loaded and
searched as they are added; filters apply to lines as they are loaded; and, SQL
queries are checked for correctness as you type.
## Themes
The UI can be [customized through themes](https://lnav.readthedocs.io/en/latest/config.html#theme-definitions).
![Animation of the UI cycling through themes](/assets/images/lnav-theme-cycle.gif)
## Syntax Highlighting
Errors and warnings are colored in red and yellow, respectively. Highlights are
also applied to: SQL keywords, XML tags, file and line numbers in Java
backtraces, and quoted strings. The search and SQL query prompt are also
highlighted as you type, making it easier to see errors and matching brackets.
![Animation of syntax highlighting](/assets/images/lnav-syntax-highlight.gif)
## Tab-completion
The command prompt supports tab-completion for almost all operations. For
example, when doing a search, you can tab-complete words that are displayed on
screen rather than having to do a copy & paste.
![Animation of TAB-completion](/assets/images/lnav-tab-complete.gif)
## Custom Keymaps
[Hotkeys can be customized](https://lnav.readthedocs.io/en/latest/config.html#keymap-definitions)
to run lnav commands or scripts.
## Sessions
Session information is saved automatically and restored when you are viewing the
same set of files. The current location in files, bookmarks, and applied filters
are all saved as part of the session.
## Headless Mode
The log processing features of lnav can be used in scripts if you have a canned
set of operations or queries that you want to perform regularly. You can enable
headless mode with the '-n' switch on the command-line and then use the '-c'
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:
```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
c_ip,total
10.208.110.176,2989570
10.178.4.102,11183
10.32.110.197,2020
10.29.165.250,443
```

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>

6
docs/05_docs.md Normal file
View File

@ -0,0 +1,6 @@
---
title: Docs
permalink: /docs
redirect_to:
- https://docs.lnav.org
---

6
docs/06_changeblog.md Normal file
View File

@ -0,0 +1,6 @@
---
title: ChangeBlog
layout: home
permalink: /blog/
---

25
docs/404.html Normal file
View File

@ -0,0 +1,25 @@
---
permalink: /404.html
layout: default
---
<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>
<div class="container">
<h1>404</h1>
<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>

1
docs/CNAME Normal file
View File

@ -0,0 +1 @@
lnav.org

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

31
docs/Gemfile Normal file
View File

@ -0,0 +1,31 @@
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# 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
# If you have any plugins, put them here!
group :jekyll_plugins do
end
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", "~> 1.2"
gem "tzinfo-data"
end
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
gem "webrick", "~> 1.7"

270
docs/Gemfile.lock Normal file
View File

@ -0,0 +1,270 @@
GEM
remote: https://rubygems.org/
specs:
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)
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)
ethon (0.15.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
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)
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 (3.9.2)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (>= 1.17, < 3)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.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-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)
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.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
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.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)
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)
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
arm64-darwin-21
x86_64-linux
DEPENDENCIES
github-pages
minima (~> 2.5)
tzinfo (~> 1.2)
tzinfo-data
wdm (~> 0.1.1)
webrick (~> 1.7)
BUNDLED WITH
2.3.20

4
docs/README.md Normal file
View File

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

62
docs/_config.yml Normal file
View File

@ -0,0 +1,62 @@
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
#
# If you need help with YAML syntax, here are some quick references for you:
# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml
# https://learnxinyminutes.com/docs/yaml/
#
# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: The Logfile Navigator
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
for the small-scale.
# baseurl: /lnav
# url: "http://lnav.org" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: lnavapp
github: tstack/lnav
# Build settings
theme: minima
plugins:
- jekyll-feed
- jekyll-redirect-from
show_excerpts: true
exclude:
- source
- tutorials
# Exclude from processing.
# The following items will not be processed, by default.
# Any item listed under the `exclude:` key here will be automatically added to
# the internal "default list".
#
# Excluded items can be processed by explicitly listing the directories or
# their entries' file path in the `include:` list.
#
# exclude:
# - .sass-cache/
# - .jekyll-cache/
# - gemfiles/
# - Gemfile
# - Gemfile.lock
# - node_modules/
# - vendor/bundle/
# - vendor/cache/
# - vendor/gems/
# - vendor/ruby/

121
docs/_includes/social.html Normal file
View File

@ -0,0 +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 -%}
<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>

78
docs/_layouts/top.html Normal file
View File

@ -0,0 +1,78 @@
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
{%- include head.html -%}
<link rel="icon" type="image/svg+xml" href="/assets/images/favicon.svg">
<link rel="icon" type="image/png" href="/assets/images/favicon.png">
<style>
main {
margin: 0 50px;
}
#top-description {
font-size: xx-large;
margin-top: 3em;
margin-left: 1em;
}
#intro {
font-size: x-large;
font-weight: lighter;
margin-top: 2em;
margin-left: 2em;
}
.dlrow {
display: grid;
align-items: start;
grid-template-columns: repeat(auto-fit, minmax(22em, 1fr));
width: 100%;
}
p:before, #top-description:before {
content: "";
width: 6em;
display: block;
overflow: hidden;
}
dl {
display: grid;
grid-template-rows: auto auto;
grid-auto-flow: column;
}
dl dt {
font-weight: normal;
font-size: x-large;
text-align: center;
border-bottom: 1px solid #8d8;
margin: 20px 30px;
height: 2em;
}
dl dd {
margin: 0 30px 20px 30px;
min-height: 3em;
color: #828282;
font-size: medium;
}
</style>
<body>
<a href="https://github.com/tstack/lnav">
<img loading="lazy" width="149" style="position: absolute; z-index: 100" height="149" src="https://github.blog/wp-content/uploads/2008/12/forkme_left_green_007200.png?resize=149%2C149" class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1">
</a>
{%- include header.html -%}
<main class="page-content" aria-label="Content">
{{ content }}
</main>
{%- include footer.html -%}
</body>
</html>

View File

@ -0,0 +1,56 @@
---
layout: post
title: "Support for JSON-encoded logs in v0.6.1"
date: 2013-09-10 00:00:00
excerpt: Turning JSON barf into something readable.
---
Making logs easily digestible by machines is becoming a concern as tools like
elasticsearch become more popular. One of the popular strategies is to encode
the whole log message in JSON and then write that as a single line to a file.
For example:
```json
{"time": "2013-09-04T23:55:09.274041Z", "level" : "INFO", "body" : "Hello, World!" }
{"time": "2013-09-04T23:56:00.285224Z", "level" : "ERROR", "body" : "Something terrible has happened!", "tb": " foo.c:12\n bar.y:33" }
```
Unfortunately, what is good for a machine is not so great for a human. To try to
improve the situation, the latest release of lnav includes support for parsing
JSON log messages and transforming them on-the-fly. The display format is
specified in a log format configuration and can specify which fields should be
displayed on the main message line. Any unused fields that are found in the
message will be displayed below the main field so you don't miss anything.
The above log lines can be transformed using the following format configuration:
```json
{
"json_ex_log": {
"title": "Example JSON Log",
"description": "An example log format configuration for JSON logs",
"json": true,
"file-pattern": "test-log\\.json.*",
"level-field": "level",
"line-format": [
{
"field": "time"
},
" ",
{
"field": "body"
}
]
}
}
```
After copying this config to `~/.lnav/formats/test/format.json`, the log messages
will look like this when viewed in lnav:
```
2013-09-04T23:55:09.274041Z Hello, World!
2013-09-04T23:56:00.285224Z Something terrible has happened!
tb: foo.c:12
tb: bar.y:33
```

View File

@ -0,0 +1,12 @@
---
layout: post
title: "Four years on GitHub"
date: 2013-09-13 00:00:00
excerpt: Still going strong!
---
The [first commit](https://github.com/tstack/lnav/commit/b4ec432515e95e86ec9d711833b8cb34d0912546)
to the [lnav repository](https://github.com/tstack/lnav) was four years ago
today! I started working on lnav a couple of years before that, but this was
its first public appearance. I still use it every day and plan to keep things
going for years to come.

View File

@ -0,0 +1,8 @@
---
layout: post
title: "Mini review of lnav in Linux Magazine"
date: 2013-10-05 00:00:00
---
The [October issue of Linux Magazine](http://www.linux-magazine.com/Issues/2013/155/Tool-Tips)
has a nice review of lnav v0.5.0, the author gave it four out of five stars!

View File

@ -0,0 +1,23 @@
---
layout: post
title: "Competing with 'tail -f'"
date: 2013-09-10 00:00:00
excerpt: The standard utilities are tough competition.
---
Probably the toughest competition for lnav is the standard Unix utilities like
tail, grep, less, and emacs/vim. It can be hard trying to convince people that
these built-in commands that they've used for forever can be improved upon. The
advanced features of lnav might even work against it since folks are expecting
to have to learn a bunch of stuff to see any benefits.
The reality is that there are quite a few "passive" features in lnav that can
provide value with no effort required by the user. For example, lnav can easily
replace 'tail -f', it's even shorter to type! Beyond the basic task of
displaying new lines appended to a log file, you also get to see log messages
from multiple files interleaved, the ability to scroll backwards, syntax
highlighting, live searching, and so on. These basic features do not have the
same "wow" factor as executing a SQL query over data automatically extracted
from a log file, but they're the features that get used 90% of the time.
Anyways, I think I'm gaining a new appreciation for marketing/sales...

View File

@ -0,0 +1,9 @@
---
layout: post
title: "Mini-review of lnav in Linux User Magazine"
date: 2013-09-10 00:00:00
---
The german magazine, [Linux User](http://www.linux-user.de/), has a
mini-review of lnav v0.6.0 in their
[November issue](http://www.linux-user.de/Downloads/LUCE/2013/lu-ce_2013-11.pdf)!

View File

@ -0,0 +1,21 @@
---
layout: post
title: "Changes To The Scrollbar"
date: 2014-02-22 00:00:00
excerpt: Packing more information into the right scrollbar.
---
I've made some changes to the scrollbar that is shown on the right side of the
display based on some feedback from users. The scroll area now has a single
vertical line extending from the top to the bottom. Previously, this area would
show log message characters and it wasn't very clear that the scroll bar
existed. The line is colored based whether there are errors or warnings in that
part of the log. The coloring should make it easier to see the distribution of
errors across the whole log. Similarly, there are notches added to the left and
right side of the line to show search hits and bookmarks, respectively. See the
following screenshot to get an idea of what it looks like:
![Screenshot of the redesigned scrollbar](/assets/images/scrollbar-change-2.png)
These changes are currently only in the latest code from git. I'll be playing
with things a bit more before making a release.

View File

@ -0,0 +1,23 @@
---
layout: post
title: Added "lo-fi" mode
excerpt: An alternative way to copy displayed text.
---
*(This change is in v0.7.2+)*
Copying text to the clipboard can be done by marking lines with the
[bookmark hotkeys](https://docs.lnav.org/en/latest/hotkeys.html#bookmarks),
like `m`, and then pressing `c`. Commands that write to a file,
like [`:write-csv-to`](https://docs.lnav.org/en/latest/commands.html#write-csv-to-path)
accept `/dev/clipboard` as a way to write to the clipboard. However, if the
native clipboard isn't supported, or you're on an SSH connection, you can
now switch to "lo-fi" mode. In "lo-fi" mode, lnav drops out of the curses
display and prints the raw text to the terminal. You can switch to "lo-fi"
mode in a view by pressing `CTRL-L`. For commands, you can use a dash `-`
to switch to "lo-fi" and print to standard out.
<script id="asciicast-fH4cdgugIJVcPQnSwCmTdaA7f"
src="https://asciinema.org/a/fH4cdgugIJVcPQnSwCmTdaA7f.js"
async>
</script>

View File

@ -0,0 +1,39 @@
---
layout: post
title: "Pretty-print view in v0.7.3"
date: 2015-04-11 00:00:00
excerpt: Automatically reformat structured data with "SHIFT+P".
---
I wanted to call out the pretty-print feature in the latest release of lnav.
This idea came from a coworker of Suresh who was having a hard time trying to
read some unformatted XML in a log. They wanted the XML pretty-printed and were
hoping that could be done by just piping the message to xmlpp or the like. So,
first we implemented the 'pipe-to' and 'pipe-line-to' commands that will let you
pipe log messages to a command and then display the result inside of lnav. That
worked well enough, but pretty-printing is such a frequent operation that having
to execute a command was kind of a pain. It would also be nice if it worked for
a variety of text, like JSON or Python data. The solution we came up with was to
leverage the existing code for parsing log messages to create a simple
pretty-printer that should work for most data formats. Another benefit is that
the log message does not have to be well-formed for the printer to work, any
leading or trailing garbage shouldn't confuse things.
As an example, here is a screenshot of the log message with the unformatted XML
text with word-wrapping turned on:
![Screenshot of raw XML](/assets/images/lnav-before-pretty.png)
That's not very easy to read and it's hard to figure out the structure of the
message. Now, here is that same message after pressing SHIFT+P to switch to the
pretty-print view of lnav:
![Screenshot of pretty-printed XML](/assets/images/lnav-after-pretty.png)
The XML text is indented nicely and the usual syntax highlighting is applied.
Also notice that lnav will automatically try to lookup the DNS name for IP
addresses. Overall, I think it's a major improvement over the raw view.
This is a pretty simple feature but I have found it quite useful in the couple
weeks that it has been implemented. It's so useful that I'm kicking myself for
not having thought of it before.

View File

@ -0,0 +1,10 @@
---
layout: post
title: "lnav in print"
date: 2016-03-20 00:00:00
---
A [review of lnav](https://archive.org/details/Linux_User_Developer_162_2016_UK/page/n87/mode/2up)
is in Linux User & Developer magazine issue 162:
![Picture of lnav story in the magazine](/assets/images/linux-user-and-dev-mag.jpeg)

View File

@ -0,0 +1,16 @@
---
layout: post
title: "Reveal log message source file paths by pressing left-arrow"
excerpt: Find out where log messages are coming from.
---
*(This change is in v0.8.4+)*
If you want to know which file log messages are coming from, you can press the
left-arrow to reveal the unique name and then press it again to reveal the
full path.
<script id="asciicast-ATHHpQiHVaTVxVRkhCv4ED7wT"
src="https://asciinema.org/a/ATHHpQiHVaTVxVRkhCv4ED7wT.js"
async>
</script>

View File

@ -0,0 +1,9 @@
---
layout: post
title: "Tutorial for lnav in Linux Magazine"
date: 2018-04-05 00:00:00
---
Looks like there was an in-depth
[tutorial on lnav in Linux Magazine](http://www.linux-magazine.com/Issues/2017/196/Tutorials-lnav).
Unfortunately, I didn't notice until now and missed out on a hardcopy.

View File

@ -0,0 +1,22 @@
---
layout: post
title: "Support for tagging and commenting on log messages"
excerpt: Annotate log messages with your thoughts.
---
*(This change is in v0.8.4+)*
If you have been wanting to add notes to log messages you might be interested
in, the new [`:comment`](https://docs.lnav.org/en/latest/commands.html#comment-text)
and [`:tag`](https://docs.lnav.org/en/latest/commands.html#tag-tag) commands.
These commands add a comment or tag(s) to the top message in the log view.
The comments and tags are saved in the session, so they will be restored
automatically when the file is reopened. These annotations can be searched
for using the regular search prompt and can be accessed in the
[log tables](https://docs.lnav.org/en/latest/sqlext.html#log-tables) using the
`log_tags` and `log_comment` columns.
<script id="asciicast-yRTcQd2VMv3QZVs5597OyAAxI"
src="https://asciinema.org/a/yRTcQd2VMv3QZVs5597OyAAxI.js"
async>
</script>

View File

@ -0,0 +1,35 @@
---
layout: post
title: "Visual filter editor"
excerpt: A friendlier way to interact with filters.
---
*(This change is in v0.8.5+)*
A visual filter editor has been added to make it easier to create, edit,
enable, disable, and delete filters. In the log or text views, pressing `TAB`
will open the filter editor panel. While the panel is in focus, the following
hotkeys can be used:
- `i` - Create an IN filter that will only show lines that match the given
regular expression.
- `o` - Create an OUT filter that will hide lines that match the given regular
expression.
- `Space` - Toggle the filter between being enabled and disabled.
- `Enter` - Edit the selected filter.
- `Shift+D` - Delete the filter.
- `t` - Switch a filter from an IN to an OUT or vice-versa.
- `f` - Globally enable or disable filtering.
When editing a filter, the main view will highlight lines that portion of the
lines that match the given regular expression:
- Lines that match an OUT filter are highlighted with red;
- Lines that match an IN filter are highlighted with green.
You can also press `TAB` to complete words that are visible in the main view.
<script id="asciicast-tcHeLbqVImRVcxWTYIrm3v6bw"
src="https://asciinema.org/a/tcHeLbqVImRVcxWTYIrm3v6bw.js"
async>
</script>

View File

@ -0,0 +1,28 @@
---
layout: post
title: Support for Themes
excerpt: Change the user-interface to your liking
---
*(This change is in v0.9.0+)*
The lnav user-interface can now be customized by selecting one of the
builtin themes, like
[monocai](https://github.com/tstack/lnav/blob/master/src/themes/monocai.json)
and
[night-owl](https://github.com/tstack/lnav/blob/master/src/themes/night-owl.json),
or
[by defining your own theme](https://lnav.readthedocs.io/en/latest/config.html#theme-definitions).
Selecting a theme can be done through the
[`:config`](https://docs.lnav.org/en/latest/commands.html#config-option-value)
command, like so:
```
:config /ui/theme monocai
```
Pressing `TAB` after the `/ui/theme ` will cycle through the available themes,
like so:
![Animation of lnav cycling through themes](/assets/images/lnav-theme-cycle.gif)

View File

@ -0,0 +1,39 @@
---
layout: post
title: Drilling down into XML snippets
excerpt: The new "xpath()" table-valued SQL function.
---
*(This change is in [**v0.10.0+**](https://github.com/tstack/lnav/releases/tag/v0.10.0))*
XML snippets in log messages can now be queried using the
[`xpath()`](https://docs.lnav.org/en/latest/sqlext.html#xpath-xpath-xmldoc)
table-valued SQL function. The function takes an
[XPath](https://developer.mozilla.org/en-US/docs/Web/XPath), the XML snippet
to be queried, and returns a table with the results of the XPath query.
For example, given following XML document:
```xml
<msg>Hello, World!</msg>
```
Extracting the text value from the `msg` node can be done using the following
query:
```sql
SELECT result FROM xpath('/msg/text()', '<msg>Hello, World!</msg>')
```
Of course, you won't typically be passing XML values as string literals, you
will be extracting them from log messages. Assuming your log format already
extracts the XML data, you can do a `SELECT` on the log format table and join
that with the `xpath()` call. Since it can be challenging to construct a
correct `xpath()` call, lnav will suggest calls for the nodes it finds in any
XML log message fields. The following asciicast demonstrates this flow:
<script id="asciicast-x89mrk8JPHBmB4pTbaZvTt8Do"
src="https://asciinema.org/a/x89mrk8JPHBmB4pTbaZvTt8Do.js"
async>
</script>
The implementation uses the [pugixml](https://pugixml.org) library.

View File

@ -0,0 +1,32 @@
---
layout: post
title: Tailing files on remote hosts
excerpt: Native support for tailing logs on machines accessible via SSH
---
*(This change is in [**v0.10.0+**](https://github.com/tstack/lnav/releases/tag/v0.10.0))*
One of the new features in the upcoming v0.10.0 release of lnav is support
for tailing log files on remote hosts via SSH. This feature allows you to
view local files and files from multiple remote hosts alongside each other
in the log view. The only setup required is to ensure the machines can be
accessed via SSH without any interaction, meaning the host key must have
been previously accepted and public key authentication configured. Opening
a remote file is then simply a matter of specifying the location using the
common scp syntax (i.e. `user@host:/path/to/file`).
When lnav accesses a remote host, it transfers an agent (called the
"tailer") to the host to handle file system requests from lnav. The agent
is an [αcτµαlly pδrταblε εxεcµταblε](https://justine.lol/ape.html) that
should run on most X86 Operating Systems. The agent will monitor the
files of interest and synchronize their contents back to the host machine.
In addition, the agent can be used to satisfy interactive requests for
TAB-completion of remote file paths and previewing directory and file
contents.
The following asciicast shows lnav opening log files on MacOS and FreeBSD:
<script id="asciicast-fblzf1Ir5Rr0b5wMGEJBb95ye"
src="https://asciinema.org/a/fblzf1Ir5Rr0b5wMGEJBb95ye.js"
async>
</script>

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.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="1000" height="1000"><g transform="matrix(38.46153846153846,0,0,38.46153846153846,0,0)"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="26" height="26"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26">
<path d="M 13 0.1875 C 5.925781 0.1875 0.1875 5.925781 0.1875 13 C 0.1875 20.074219 5.925781 25.8125 13 25.8125 C 20.074219 25.8125 25.8125 20.074219 25.8125 13 C 25.8125 5.925781 20.074219 0.1875 13 0.1875 Z M 11.9375 3.25 C 11.785156 3.464844 11.6875 3.71875 11.6875 4 C 11.6875 4.734375 12.265625 5.3125 13 5.3125 C 13.734375 5.3125 14.3125 4.734375 14.3125 4 C 14.3125 3.71875 14.214844 3.464844 14.0625 3.25 C 18.625 3.746094 22.253906 7.375 22.75 11.9375 C 22.535156 11.785156 22.28125 11.6875 22 11.6875 C 21.265625 11.6875 20.6875 12.265625 20.6875 13 C 20.6875 13.734375 21.265625 14.3125 22 14.3125 C 22.28125 14.3125 22.535156 14.214844 22.75 14.0625 C 22.253906 18.625 18.625 22.253906 14.0625 22.75 C 14.214844 22.535156 14.3125 22.28125 14.3125 22 C 14.3125 21.265625 13.734375 20.6875 13 20.6875 C 12.265625 20.6875 11.6875 21.265625 11.6875 22 C 11.6875 22.28125 11.785156 22.535156 11.9375 22.75 C 7.375 22.253906 3.746094 18.625 3.25 14.0625 C 3.464844 14.214844 3.71875 14.3125 4 14.3125 C 4.734375 14.3125 5.3125 13.734375 5.3125 13 C 5.3125 12.265625 4.734375 11.6875 4 11.6875 C 3.71875 11.6875 3.464844 11.785156 3.25 11.9375 C 3.746094 7.375 7.375 3.746094 11.9375 3.25 Z M 18.3125 7.6875 L 11.375 11.375 L 7.6875 18.3125 L 14.625 14.625 Z M 13 11.75 C 13.695313 11.75 14.25 12.304688 14.25 13 C 14.25 13.695313 13.695313 14.25 13 14.25 C 12.304688 14.25 11.75 13.695313 11.75 13 C 11.75 12.304688 12.304688 11.75 13 11.75 Z"></path>
</svg></svg></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

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: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

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