tli

command module
v0.0.0-...-a96aff5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 3 Imported by: 0

README

TLI - Terminal Log Inspector

TLI is a simple TUI to work with log files. It's written using go and bubbletea.

Installation

 go install github.com/DebuggerAndrzej/tli@latest

Requirements:

  • go 1.22 or newer

[!TIP] default installation path for go is ~/go/bin so in order to have tli command available this path has to be added to shell user paths.

Configuration

Config file

As for now there is no config file, but it's coming Soon™!

Flags
  • path (string) - relative or absolute path to log file
  • format (string) - space separated string of format indicators (see below)
Defining format

There are 3 format indicators:

  • M - message
  • T - timestamp
  • S - severity

Imagine we have log files in format like this:

2015-10-19 17:40:55,425 INFO Useless log message string

This line will be splitted by space so we will get slice like this:

["2015-10-19", "17:40:55,425", "INFO", "Useless", "log", "message", "string"]

Index:

  • 0 and 1 - timestamps (T)
  • 2 - severity (S)
  • 3 - noise text (there is no specific indicator, but we will go with underscore (_))
  • 4 - 6 - message (M)

Last indicator will exhaust the array so we can set log fomat to: "T T S _ M"

Shortcuts

  • f - weak filter (weak filters are added to regex or)
  • F - strong filter (always required in message)
  • r - remove all filters

Other than that you can freely use mouse wheel and arrows to navigate through text.

[!NOTE] Filters work on message part of the log!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL