Bug 12335

Summary: Journalctl doesn't respect -a in paged mode
Product: Mageia Reporter: claire robinson <eeeemail>
Component: RPM PackagesAssignee: Colin Guthrie <mageia>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: Normal CC: nic
Version: Cauldron   
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: systemd CVE:
Status comment:

Description claire robinson 2014-01-17 11:30:30 CET
Minor bug but it's an annoying one. May even be a design decision.

journalctl -a should prevent long lines of output from being truncated. 

It only works that way when coupled with --no-pager or redirected to a file, so 'journalctl -a --no-pager | less' or 'journalctl -a > journal.txt'.

Reproducible: 

Steps to Reproduce:
Comment 1 Colin Guthrie 2014-01-17 11:42:39 CET
journalctl -a --no-pager | less
 and 
journalctl -a

both behave the same to me.

Lines are not wrapped, but they are not truncated either (you use right+left on the keyboard to scroll horizontally).

Am I missing the problem?
Comment 2 claire robinson 2014-01-17 11:54:28 CET
Ahh operator error in that case Colin. To think after all this time it never crossed my mind to use left/right cursor keys :\

The wrap missing is the difference that confused me. Copying text from the built in pager, without wrap, cuts off extraneous text.

Close as a meatware bug if you like :)
Comment 3 Colin Guthrie 2014-01-17 12:37:58 CET
The non-wrapping and scrolling is to do with the default pager settings but you can override with a env var SYSTEMD_PAGER.

That said there does seem to be a bug...

By default our pager settings are "less -FR" and doing "journalctl -a -b" indeed creates a process accordingly but *does not* wrap the lines.

But if we do "journalctl -a -b | less -FR" it *does* wrap the lines.

So yeah, I think there is a bug in there somewhere.

I also cannot reproduce my behaviour from above and I *do* see a difference between the two commands (they are wrapped by default when doing an out of process less)
Comment 4 claire robinson 2014-01-17 13:08:20 CET
I'm glad it's been a useful exercise at least Colin, thanks for looking into it and responding so quickly :)
Comment 5 Nic Baxter 2015-12-24 05:58:04 CET
I gather this is OK to close?

Status: NEW => RESOLVED
CC: (none) => nic
Resolution: (none) => FIXED