Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#32629 - [systemd] --lines=,n 0 option support for journalctl

Attached to Project: Arch Linux
Opened by Liu Wei (lwjef) - Tuesday, 13 November 2012, 16:33 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 17 November 2012, 17:55 GMT
Task Type Support Request
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When you write a shell script need monitor log outputs, this feature is essential.

Before we write this with syslog and tail.

"tail -fn0 /path/to/logfile | while read line ; do"

Likely, maybe we can use "journalctl -fn1 /path/to/sth ...", but it's buggy.

Sorry for my poor english.

Additional info:
* systemd 195-2


Steps to reproduce:
# journalctl -n0
Failded to parse lines '0'
This task depends upon

Closed by  Dave Reisner (falconindy)
Saturday, 17 November 2012, 17:55 GMT
Reason for closing:  Upstream
Comment by Dave Reisner (falconindy) - Wednesday, 14 November 2012, 22:41 GMT
What is "buggy" about -n1 that wouldn't be generally buggy about parsing the journal (or syslog) with generic text tools?
Comment by Liu Wei (lwjef) - Thursday, 15 November 2012, 02:55 GMT
Maybe this word is not appropriate, I was a novice on writing shell scripts.
When using "journalctl -fn1 /path/to/sth", it will always give the last line of the log, I have to write some extra processing it.

But I do not know how to handle it with a simple way, I just want handle the new log line.
Comment by Dave Reisner (falconindy) - Saturday, 17 November 2012, 17:55 GMT
Please report this upstream if you want this changed.

Loading...