Skip to content

Lightweight log filtering tool supporting regular expressions and instant (as-you-type) results.

Notifications You must be signed in to change notification settings

alexhude/PeculiarLog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Peculiar Log

PeculiarLog is a lightweight log filtering tool supporting regular expressions and instant (as-you-type) results.

It is designed to work with huge multi-gigabyte text files utilizing the power of Intel Hyperscan engine running on multiple CPU cores.

Building

You can find most recent compiled version here

Prerequisites

Since PeculiarLog is based on Intel Hyperscan engine it is expecting headers to be available at /usr/local/opt/hyperscan/include/hs and libhs.a located at /usr/local/lib

Brew is the easiest way to install Hyperscan engine.

$ brew install hyperscan

Source

When everything is set, open Xcode project to build PeculiarLog from source. Minimum requirements - Xcode 9 and Swift 4.1.

AVX512 support

In order to make it even faster on host with AVX512 instructions it is necessary to rebuild HyperScan with the following options.

$ mkdir build
$ cd build
$ cmake -DBUILD_AVX512=on -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC_AND_SHARED=on ../
$ make

Then link new libhs.a to the project or replace the one installed with Brew.

Using

Just open app, drag log file to the icon and start typing regex in the field. Use setting panel or shortcuts to change scope, toggle caseless regex or line numbers.

Patterns

There are several limitation applied to the supported regex patterns by Hyperscan.

Hyperscan supports the pattern syntax used by the PCRE library (“libpcre”), 
described at <http://www.pcre.org/>. However, not all constructs available 
in libpcre are supported. The use of unsupported constructs will result in 
compilation errors.

The version of PCRE used to validate Hyperscan’s interpretation of this 
syntax is 8.41 or above.

Hit enter to get pattern compilation error in the bottom left corner of a status bar.

Shortcuts

There is a hint on the right side of a settings panel for the most useful shortcuts.

⇧ ⌃ ↑  - increase 'before' scope
⇧ ⌃ ↓  - decrease 'before' scope
⇧ ⌘ ↑  - decrease 'after' scope 
⇧ ⌘ ↓  - increase 'after' scope 
⇧ ⌘ c  - toggle caseless regex
⇧ ⌘ l  - toggle line numbers

Some other line related shortcuts available from View menu.

⌃ ⌘ l  - copy current line number
  ⌘ l  - go to line

Export

There are several ways to export results:

  • select lines right in the application window and copy to clipboard
  • save filtered results to a separate file using File/Export Filtered menu
  • save selected lines to a separate file using File/Export Selected menu

Demo

Credits

Powered by Hyperscan
Icon is taken from freeiconshop.com

About

Lightweight log filtering tool supporting regular expressions and instant (as-you-type) results.

Resources

Stars

Watchers

Forks

Packages

No packages published