in_systemd: add journal namespace feature
Is your feature request related to a problem? Please describe. I use systemd-journald namespace to isolate my application log.
Describe the solution you'd like
Add Namespace option, then use sd_journal_open_namespace.
Describe alternatives you've considered N/A
Additional context Journal 'namespaces' are both a mechanism for logically isolating the log stream of projects consisting of one or more services from the rest of the system and a mechanism for improving performance. Multiple journal namespaces may exist simultaneously, each defining its own, independent log stream managed by its own instance of systemd-journald.
https://www.freedesktop.org/software/systemd/man/latest/systemd-journald.service.html#Journal%20Namespaces
I've tried using Path option, specified to /var/log/journal/<machine-id>.<namespace>, it did work (with root privilege or in systemd-journal group), but it will be nice to have Namespace option.
This would be a great addition to fluent-bit 👍
I also used the path option, but IMHO it has a big downside: You need to know/configure the machine-id. With a namespace option this wouldn't be needed.