You are not logged in.

#1 2013-09-20 07:04:43

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

[solved] How to have line breaks in output of journalctl log

Hello,

How can I have line breaks in the journalctl log output?

At the moment I cannot read most of the log output because it does not fit into my terminal.

See this screenshot: http://i.imgur.com/nUR6Fae.png

Thanks!

Last edited by orschiro (2013-09-20 08:08:04)

Offline

#2 2013-09-20 07:47:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] How to have line breaks in output of journalctl log

Don't use '--no-pager' and use keyboard arrow keys to scroll.

Edit: With '--no-pager' you can redirect it to e.g. less and they will nicely wrap around.

Last edited by karol (2013-09-20 07:49:42)

Offline

#3 2013-09-20 07:49:52

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] How to have line breaks in output of journalctl log

I am not talking about vertical but horizontal fit. Sorry that it was unclear.

Offline

#4 2013-09-20 07:50:53

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] How to have line breaks in output of journalctl log

orschiro wrote:

I am not talking about vertical but horizontal fit. Sorry that it was unclear.

What happens if you press the right arrow?

Offline

#5 2013-09-20 07:53:24

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] How to have line breaks in output of journalctl log

Nice, it scrolls to the right! I did not know that I can navigate with the arrow keys. I was always using j and k for that.

Nevertheless it would be nice to have line breaks. Is that possible?

Offline

#6 2013-09-20 07:54:15

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] How to have line breaks in output of journalctl log

You can run

journalctl -b --no-pager | less


Edit: If you hit 'h' you get help screen

SUMMARY OF LESS COMMANDS

<snip>

ESC-)  RightArrow *  Left  one half screen width (or N positions).
ESC-(  LeftArrow  *  Right one half screen width (or N positions).

<snip>

It may be possible to configure the way the journal uses the pager so it wraps the lines by default.

Edit 2: Or maybe it can't be configured.

man journalctl wrote:

The output is paged through less by default, and long lines are "truncated" to screen width. The hidden part can be viewed by using the left-arrow and right-arrow keys. Paging can be disabled, see --no-pager and section Environment below.

Last edited by karol (2013-09-20 08:02:13)

Offline

#7 2013-09-20 08:07:51

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] How to have line breaks in output of journalctl log

Alright. Thanks for the clarification.

I like the `journalctl -b --no-pager | less` smile

Last edited by orschiro (2013-09-20 08:09:30)

Offline

Board footer

Powered by FluxBB