Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Not all tools operate on stdin.

So pipe it to a file and operate on that. Or give the broken tool /dev/stdin as its filename. Or give it a fifo as a filename and "journalctl | /path/to/fifo.

> All the binary logs are going to do is make people have a cronjob to extract them regularly into a readable format.

For those who insist on that, yes. Most of them will presumably have logrotate set up anyway, so it's hardly more complexity. Or you can run a syslog, and trivially set up systemd to forward the log entries to that.

Meanwhile the rest of us will enjoy the ability to do things like specify a start and end time with command line switches when trying to find stuff in the log, filter by priority, filter by user, filter by pid. seeing only data since last boot, get the journal as JSON instead of having to rely on brittle text parsing of entries that contains less information.

Regarding the last point, here's an example of an entry from journalctl -o json-pretty:

  {
        "__CURSOR" : "s=56750fa36ad94eb99c00e7fd6854c400;i=2;b=2f533403d7a041e7a389e3a7090942de;m=172e6e4;t=4f7c809a2f61d;x=79a98b8a5116658a",
	"_SYSTEMD_CGROUP" : "/system/cron.service",
	"_SYSTEMD_UNIT" : "cron.service",
	"SYSLOG_FACILITY" : "10",
	"SYSLOG_IDENTIFIER" : "CRON",
	"_CMDLINE" : "/USR/SBIN/CRON",
	"MESSAGE" : "pam_unix(cron:session): session closed for user root",
	"SYSLOG_PID" : "2398",
	"_PID" : "2398",
	"_SOURCE_REALTIME_TIMESTAMP" : "1398345421294046"
  }


Pipe that into http://stedolan.github.io/jq/ and you could do things.


Seems like unnecessary bloat and decoding overhead. I can get all the same detail from a single line.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: