← 返回命令列表

Linux command

logss 命令

文件

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Split logs by multiple regex patterns

tail -f [logfile] | logss -c "[pattern1]" -c "[pattern2]"

Write matched patterns to files

tail -f [logfile] | logss -c "[pattern]" -o [output_dir/]

Get input from a command instead of stdin

logss -C "[command]" -c "[pattern]"

Use a configuration file

logss -f [config.yaml]

Start in vertical view mode

tail -f [logfile] | logss -c "[pattern]" -V

说明

logss is a CLI/TUI tool for visualizing and splitting log streams in real time. It allows you to define multiple regex patterns and view matching log entries in separate panes, with automatic color coding and adjustable render speed. The tool reads from stdin (or a command via `-C`) and distributes log lines to different views based on pattern matches. Each pattern container can optionally trigger a shell command when a match occurs, using `__line__` as a placeholder for the matched line. A dedicated container displays the raw unfiltered stream. Interactive controls include pause/resume, scroll, zoom, show/hide containers, and toggling line wrap.

参数

-c _PATTERN_
Specify a regex pattern to match and split logs by. May be `pattern`, or `pattern,command,timeout` to trigger a shell command on each match.
-C _COMMAND_
Get input from a shell command instead of stdin.
-f _FILE_
Load configuration from a YAML file (overrides CLI arguments).
-o _OUTPUT_PATH_
Write matched lines to files in the specified output path.
-r _MS_
Define render speed in milliseconds. Default: 100.
-s
Start in single view mode.
-t _N_
Number of threads per container for triggers. Default: 1.
-V
Start in vertical view mode.
-e
Exit on empty input.
-h
Print help.

FAQ

What is the logss command used for?

logss is a CLI/TUI tool for visualizing and splitting log streams in real time. It allows you to define multiple regex patterns and view matching log entries in separate panes, with automatic color coding and adjustable render speed. The tool reads from stdin (or a command via `-C`) and distributes log lines to different views based on pattern matches. Each pattern container can optionally trigger a shell command when a match occurs, using `__line__` as a placeholder for the matched line. A dedicated container displays the raw unfiltered stream. Interactive controls include pause/resume, scroll, zoom, show/hide containers, and toggling line wrap.

How do I run a basic logss example?

Run `tail -f [logfile] | logss -c "[pattern1]" -c "[pattern2]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c _PATTERN_ do in logss?

Specify a regex pattern to match and split logs by. May be `pattern`, or `pattern,command,timeout` to trigger a shell command on each match.