ClusterLabs / ClusterLabs/crmsh

history: add capability to color parts of log files

Open
#97 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
143
Forks
96
Avg merge
2d 6h
Merged PRs (30d)
16

Description

from https://bugzilla.suse.com/show_bug.cgi?id=930237

> We could take log coloring a bit further.
>
> The idea is to have regular expressions and color whatever matches. For instance, it would be useful to color red everything starting with "ERROR" and "CRIT" (nowadays aka "error" and "crit").
>
> It should be configurable, i.e. let the user add regex-color mapping to a file.
>
> It is important to reset back to the initial color at the end of the match, so we need to keep track of the current color on the line.
>
> It'd be good to allow more than eight colors we currently have.
>
> I think I've seen once some utility which does this for syslog based logs.
>
> And we could also this way make RA messages stand out.
>
> I've thought about this for the log viewer in the web interface, which currently doesn't do any kind of highlighting at all. At the very least, it should highlight which node the log comes from, but I also think highlighting error lines would be great.

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating the history log viewer and the web-interface log viewer, then trace how log output and user configuration are handled. Done would require an agreed scope for regex-based coloring, color resets, expanded colors, and highlighting relevant log content.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.