<div dir="ltr"><div>Is it possible to store journal logs matching specific filters to different journal files in addition to the main journal using some journald configurations?</div><div><br></div><div><br></div><div>For eg.,  All journal logs of severity critical and above should be stored in /var/log/critical/critial.journal in addition to the main journal. </div><div><br></div><div><br></div><div><br></div><div>Currently I am achieving this via combination of systemd-journal-remote and journalctl as below</div><div><br></div><div>ExecStart=/lib/systemd/systemd-journal-remote  --output=/var/log/critical/critical.journal --getter="journalctl -f PRIORITY=3 -o export"</div><div><br></div><div>In this approach, I have the following disadvantages</div><div>1) For each filter output combination, I need to create additional service</div><div>2) Somethings we miss few logs, couldnt root cause it yet.</div><div>3) Also I not sure whether this would be a better  compared to the systemd-journald directly storing them in different journal files.</div><div><br></div><div><br></div><div><br></div><div>Hence, I prefer a systemd-journald configuration like following</div><div><br></div><div>TargetFilter1="PRIORITY=2"</div><div>TargetDestination1="/var/log/critical.journal"</div><div><br></div><div>TargetFilter2="_UNIT=CPROCESSOR"</div><div>TargetDestination2="/var/log/cprocessor.journal"</div><div><br></div><div>which will store those logs matching the filters to the corresponding destination.</div></div>