Log Analyzer Pro (lap)

A powerful log analyzer application for the terminal written in Rust

demo

Features

Installation

cargo install log-analyzer-pro

The binary executable is lap

Usage

Menu navigation

Use Shift + Arrows or ⇥ Tab to navigate across the application menus and change focus. * Left: ⇧ Shift + * Right: ⇧ Shift + * Up: ⇧ Shift + * Down: ⇧ Shift +

Inner navigation

When focused on a tab, list or table, use the Arrows to change the selection * Left: ⇧ Shift + * Right: ⇧ Shift + * Up: ⇧ Shift + * Down: ⇧ Shift +

Inner navigation

When focused on a tab, list or table, use the Arrows to change the selection * Left: * Right: * Up: * Down:

Resize modules

Sources Module

Filters Module

Log & Search results module

* * Use inner navigation to navigate through the logs and apply horizontal scroll * Press ⌥ Option or Alt + inner navigation for rapid scroll * Press Page Up or Page Down to paginate 1000 lines * Navigate to index (or closest): ⇧ Shift + G * Toggle columns ON/OFF: - i: Index - d: Date - d: Timestamp - a: App - s: Severity - f: Function - p: Payload

Search highlighting

You can highlight search results by using regex groups in your search. The name of the group should be the color you want to highlight the match with. The list of available colors is: - BLACK - WHITE - RED - GREEN - YELLOW - BLUE - MAGENTA - CYAN - GRAY - DARKGRAY - LIGHTRED - LIGHTGREEN - LIGHTYELLOW - LIGHTBLUE - LIGHTMAGENTA - LIGHTCYAN

Search example: ``` (?Psuccess_ok).*(?Pmessage) ````

Customization

You can use a json file to customize the application look and preload formats and filters by using a command line argument:

lap --settings path_to_settings_file.json

Example file json { "primary_color": [0, 225, 255], "formats": [ { "alias": "Default", "regex": "(?P<PAYLOAD>.*)" }, { "alias": "Application", "regex": "(?P<DATE>[\\d]{4}-[\\d]{2}-[\\d]{2} [\\d]{2}:[\\d]{2}:[\\d]{2},[\\d]{3}) - \\[(?P<SEVERITY>[\\w]*)\\] - \\[([ \\w]{4})\\] - \\[(?P<TIMESTAMP>[ \\d]*)\\] (?P<PAYLOAD>.*)" }, { "alias": "System", "regex": "(?P<DATE>[\\d]{4}-[\\d]{2}-[\\d]{2} [\\d]{2}:[\\d]{2}:[\\d]{2}.[\\d]*) \\((?P<APP>[\\w\\d]*)[/ ]?(?P<FUNCTION>.*)\\) (?P<PAYLOAD>.*)" } ], "filters": [ { "alias": "System", "action": "MARKER", "filter": { "app": "system", "color": [100, 100, 0] } }, { "alias": "SIGKILL", "action": "MARKER", "filter": { "payload": "SIGKILL", "color": [255, 0, 0] } } ] }

License

Dual-licensed under MIT or the UNLICENSE.