On Thu, 29 Jun 2023 17:44:01 +0200 lejeczek via users <users@lists.fedoraproject.org> wrote:
> On 28/06/2023 20:26, stan via users wrote: > > Operator error. Exporting the wrong name because of a cut and > > paste. Once I fixed that, definitely works to change colors in > > journalctl output, will have to tune it to get what I want. > > I put this in my .bashrc so everything is set on login. > > SYSTEMD_PAGER=less > > export SYSTEMD_PAGER > > SYSTEMD_LESS="[list of less options]" > > export SYSTEMD_LESS > > _______________________________________________ > Not exactly, I'd not think of it as _the_ solution - (I much This is correct. After I posted this, I found that it is impossible to actually set the colors in journalctl because they are hard coded as escape sequences when the data is written into the journal. What I had done is remove the R option to less, which turns off such escape sequences. In my case, the less options I set for color then seems to highlight the ESC in light red, so I know which lines journalctl wants to highlight, but not their status. That isn't optimal, but the horrible dark blue on black background is gone, so I can live with it. > prefer to up&down pages via actual mechanical scrolling) - > as I use, always I've had, SYSTEMD_PAGER=cat so... > > man page for 'journalctl' has a shor section: > When outputting to a tty, lines are colored according to > priority: lines of level ERROR and higher are colored red; > lines of level NOTICE and higher are highlighted; > lines of level DEBUG are colored lighter grey; other lines are > displayed normally. > > would be nice to be able to customize those & if 'systemd' > delegates declaration of that 'highlighting' colour then > these below do not do it: > a) terminal-colors.d - perhaps systemd/journal ignores it > altogether > b) gnome-terminal has config for 'Highlight colour' > > It would be great/the best to have that functionality > internal to systemd/journal - thus, if authors/devel might > read here - please think of this conversation's subject as > possible future addition/enhancement to the software. Yes, this would be the solution. Unless there is some setting in systemd already that allows for changing the colors, they are set by systemd when it writes things into the journal, probably based on what the application requests when it reports the error. _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue