diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000..f40fbd8b --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,5 @@ +_site +.sass-cache +.jekyll-cache +.jekyll-metadata +vendor diff --git a/docs/02_downloads.md b/docs/02_downloads.md new file mode 100644 index 00000000..9f292c00 --- /dev/null +++ b/docs/02_downloads.md @@ -0,0 +1,33 @@ +--- +layout: page +title: Downloads +permalink: /downloads +--- + +The latest version is [**v0.9.0**](https://github.com/tstack/lnav/releases/latest). + +## Linux + +Install from the [Snap Store](https://snapcraft.io/lnav): + +```shell +% sudo snap install lnav +``` + +## MacOS + +Install using [Homebrew](https://formulae.brew.sh/formula/lnav): + +```shell +% brew install lnav +``` + +## Source + +```shell +% tar xvfz +% cd lnav- +% ./configure +% make +% make install +``` diff --git a/docs/03_features.md b/docs/03_features.md new file mode 100644 index 00000000..6b4432a9 --- /dev/null +++ b/docs/03_features.md @@ -0,0 +1,4 @@ +--- +layout: page +title: Features +--- diff --git a/docs/04_docs.md b/docs/04_docs.md new file mode 100644 index 00000000..3c193544 --- /dev/null +++ b/docs/04_docs.md @@ -0,0 +1,6 @@ +--- +title: Docs +permalink: /docs +redirect_to: + - https://docs.lnav.org +--- diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 00000000..086a5c9e --- /dev/null +++ b/docs/404.html @@ -0,0 +1,25 @@ +--- +permalink: /404.html +layout: default +--- + + + +
+

404

+ +

Page not found :(

+

The requested page could not be found.

+
diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 00000000..34d9138f --- /dev/null +++ b/docs/Gemfile @@ -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 + gem "jekyll-feed", "~> 0.12" + gem "jekyll-redirect-from", "~> 0.16.0" +end + +# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem +# 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] + diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 00000000..b31e0431 --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,83 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + colorator (1.1.0) + concurrent-ruby (1.1.9) + em-websocket (0.5.2) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) + eventmachine (1.2.7) + ffi (1.15.1) + forwardable-extended (2.6.0) + http_parser.rb (0.6.0) + i18n (1.8.10) + concurrent-ruby (~> 1.0) + jekyll (4.2.0) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 1.0) + jekyll-sass-converter (~> 2.0) + jekyll-watch (~> 2.0) + kramdown (~> 2.3) + kramdown-parser-gfm (~> 1.0) + liquid (~> 4.0) + mercenary (~> 0.4.0) + pathutil (~> 0.9) + rouge (~> 3.0) + safe_yaml (~> 1.0) + terminal-table (~> 2.0) + jekyll-feed (0.15.1) + jekyll (>= 3.7, < 5.0) + jekyll-redirect-from (0.16.0) + jekyll (>= 3.3, < 5.0) + jekyll-sass-converter (2.1.0) + sassc (> 2.0.1, < 3.0) + jekyll-seo-tag (2.7.1) + jekyll (>= 3.8, < 5.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + kramdown (2.3.1) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.3) + listen (3.5.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.4.0) + minima (2.5.1) + jekyll (>= 3.5, < 5.0) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (4.0.6) + rb-fsevent (0.11.0) + rb-inotify (0.10.1) + ffi (~> 1.0) + rexml (3.2.5) + rouge (3.26.0) + safe_yaml (1.0.5) + sassc (2.4.0) + ffi (~> 1.9) + terminal-table (2.0.0) + unicode-display_width (~> 1.1, >= 1.1.1) + unicode-display_width (1.7.0) + +PLATFORMS + universal-darwin-20 + +DEPENDENCIES + jekyll (~> 4.2.0) + jekyll-feed (~> 0.12) + jekyll-redirect-from (~> 0.16.0) + minima (~> 2.5) + tzinfo (~> 1.2) + tzinfo-data + wdm (~> 0.1.1) + +BUNDLED WITH + 2.2.20 diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 00000000..e8485925 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,58 @@ +# 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 +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: "" # the subpath of your site, e.g. /blog +url: "http://lnav.org" # the base hostname & protocol for your site, e.g. http://example.com +twitter_username: lnavapp +# github_username: tstack + +# Build settings +theme: minima +plugins: + - jekyll-feed + - jekyll-redirect-from + +exclude: + - source + +# 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/ diff --git a/docs/_layouts/top.html b/docs/_layouts/top.html new file mode 100644 index 00000000..e8204bca --- /dev/null +++ b/docs/_layouts/top.html @@ -0,0 +1,44 @@ + + + +{%- include head.html -%} + + + + + +{%- include header.html -%} + +
+ {{ content }} +
+ +{%- include footer.html -%} + + + + diff --git a/docs/_posts/2013-09-10-json-encoded-logs.md b/docs/_posts/2013-09-10-json-encoded-logs.md new file mode 100644 index 00000000..8891cd8a --- /dev/null +++ b/docs/_posts/2013-09-10-json-encoded-logs.md @@ -0,0 +1,55 @@ +--- +layout: post +title: "Support for JSON-encoded logs in v0.6.1" +date: 2013-09-10 00:00:00 +--- + +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 +``` diff --git a/docs/_posts/2013-09-13-four-years-on-github.md b/docs/_posts/2013-09-13-four-years-on-github.md new file mode 100644 index 00000000..16241210 --- /dev/null +++ b/docs/_posts/2013-09-13-four-years-on-github.md @@ -0,0 +1,11 @@ +--- +layout: post +title: "Four years on GitHub" +date: 2013-09-13 00:00:00 +--- + +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. diff --git a/docs/_posts/2013-10-05-mini-review-in-linux-magazine.md b/docs/_posts/2013-10-05-mini-review-in-linux-magazine.md new file mode 100644 index 00000000..19f9c734 --- /dev/null +++ b/docs/_posts/2013-10-05-mini-review-in-linux-magazine.md @@ -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! diff --git a/docs/_posts/2013-10-06-competing-with-tail.md b/docs/_posts/2013-10-06-competing-with-tail.md new file mode 100644 index 00000000..aea58b27 --- /dev/null +++ b/docs/_posts/2013-10-06-competing-with-tail.md @@ -0,0 +1,22 @@ +--- +layout: post +title: "Competing with 'tail -f'" +date: 2013-09-10 00:00:00 +--- + +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... diff --git a/docs/_posts/2013-11-01-mini-review-linux-user-magazine.md b/docs/_posts/2013-11-01-mini-review-linux-user-magazine.md new file mode 100644 index 00000000..02d67f61 --- /dev/null +++ b/docs/_posts/2013-11-01-mini-review-linux-user-magazine.md @@ -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)! diff --git a/docs/_posts/2014-02-22-changes-to-the-scrollbar.md b/docs/_posts/2014-02-22-changes-to-the-scrollbar.md new file mode 100644 index 00000000..33b90d45 --- /dev/null +++ b/docs/_posts/2014-02-22-changes-to-the-scrollbar.md @@ -0,0 +1,20 @@ +--- +layout: post +title: "Changes To The Scrollbar" +date: 2014-02-22 00:00:00 +--- + +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. diff --git a/docs/_posts/2015-04-11-pretty-print-view.md b/docs/_posts/2015-04-11-pretty-print-view.md new file mode 100644 index 00000000..dd5b88f0 --- /dev/null +++ b/docs/_posts/2015-04-11-pretty-print-view.md @@ -0,0 +1,38 @@ +--- +layout: post +title: "Pretty-print view in v0.7.3" +date: 2015-04-11 00:00:00 +--- + +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. diff --git a/docs/_posts/2016-03-20-lnav-in-print.md b/docs/_posts/2016-03-20-lnav-in-print.md new file mode 100644 index 00000000..73e7722a --- /dev/null +++ b/docs/_posts/2016-03-20-lnav-in-print.md @@ -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) diff --git a/docs/_posts/2018-04-05-linux-magazine-tutorial.md b/docs/_posts/2018-04-05-linux-magazine-tutorial.md new file mode 100644 index 00000000..9d868b5b --- /dev/null +++ b/docs/_posts/2018-04-05-linux-magazine-tutorial.md @@ -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. diff --git a/docs/assets/images/linux-user-and-dev-mag.jpeg b/docs/assets/images/linux-user-and-dev-mag.jpeg new file mode 100644 index 00000000..c61e8e02 Binary files /dev/null and b/docs/assets/images/linux-user-and-dev-mag.jpeg differ diff --git a/docs/assets/images/lnav-after-pretty.png b/docs/assets/images/lnav-after-pretty.png new file mode 100644 index 00000000..39837136 Binary files /dev/null and b/docs/assets/images/lnav-after-pretty.png differ diff --git a/docs/assets/images/lnav-before-pretty.png b/docs/assets/images/lnav-before-pretty.png new file mode 100644 index 00000000..3100091a Binary files /dev/null and b/docs/assets/images/lnav-before-pretty.png differ diff --git a/docs/assets/images/lnav-front-page.png b/docs/assets/images/lnav-front-page.png new file mode 100644 index 00000000..b6769317 Binary files /dev/null and b/docs/assets/images/lnav-front-page.png differ diff --git a/docs/assets/images/scrollbar-change-2.png b/docs/assets/images/scrollbar-change-2.png new file mode 100644 index 00000000..c7671c1e Binary files /dev/null and b/docs/assets/images/scrollbar-change-2.png differ diff --git a/docs/blog.md b/docs/blog.md new file mode 100644 index 00000000..7b997be4 --- /dev/null +++ b/docs/blog.md @@ -0,0 +1,5 @@ +--- +title: Blog +layout: home +--- + diff --git a/docs/index.markdown b/docs/index.markdown new file mode 100644 index 00000000..f8067cc5 --- /dev/null +++ b/docs/index.markdown @@ -0,0 +1,36 @@ +--- +# Feel free to add content and custom Front Matter to this file. +# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults + +layout: top +--- + +![Screenshot of lnav](/assets/images/lnav-front-page.png){: style="float: right"} + +## An advanced log file viewer for the small-scale + +Watch and analyze your log files from a terminal. + +No server. No setup. Still featureful. + +
+
In Your Terminal
+
+Many logging tools, like Splunk, provide great features but are optimized for +large-scale deployments. They require installing and configuring servers +before they can be effectively used. There is still a need for a robust log +file analyzer for the terminal. +
+ +
Easy to Use
+
+Just point lnav to a directory and it will take care of the rest. File formats +are automatically detected and compressed files are unpacked on the fly. +
+ +
Improved Presentation
+
+Log files are a wealth of information, lnav can help highlight the parts that +are important and filter out the noise. +
+