News for hackers. Stuff that matters.
Re:Avoiding Complexity with Systemd by InvertedRhodium on Sunday June 27, 2021 @09:35PM (#27657213)
The scenario I personally have is:

- Legacy application, with no access to source code.

- Company that wrote the application hasn't existed for a decade.

- It logs several useless lines every second. This is non-configurable, and includes a timestamp which makes each linue distinct.

- It also logs some very important lines that _must_ be responded to.

I don't think this is a unique situation to find yourself in, and currently this application is permitted - explicitly - to spam the journal to a point that it is effectively useless. Yes, you can use a filtering application to sit in between systemd but that's a workaround and not an actual solution (as stated in the issue linked above):

- it could not be "plugged in" via overlay (i.e. modification of Exec... is needed - this gets ugly especially if you have ExecStartPre/ExecStopPost)

- SyslogIdentifier has to be set to produce proper name in journald

- The filter itself has to be quite reliable (to not hang) and a bit sophisticated to properly handle signals, process shutdown, low disk space etc.

Re:Avoiding Complexity with Systemd by WesolyKubeczek on Wednesday June 30, 2021 @05:06PM (#27693418)
What you need is a pipe through grep. It’s as reliable as it gets. I don’t understand, though, why your log filter should all of a sudden grow disk space monitoring and signal handling. This is what systemd and journald should be doing, and in their recent versions, they are quite capable.
Re:Avoiding Complexity with Systemd by SiberianDweller on Monday June 28, 2021 @10:10PM (#27670888)
How about to open this exceedly verbose legacy program with IDA and fill with NOPs all the places where this program logs something useless? I mean, this is an activity which really should be named as "hacking", in opposition to playing with init scripts.
Re:Avoiding Complexity with Systemd by LargoLasskhyfv on Tuesday June 29, 2021 @07:02PM (#27682890)
Or maybe discovering configurability of log/debug levels via environment variables.