I have to forward my logs to rsyslog via UDP, but due to the volatile nature of UDP and rsyslog I would like to also log to a file. However, AFAICT MongoDB only allows one target for its logs:
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
#destination: syslog
I'm using the latest mongodb 4.
Unless I'm mistaken it doesn't even support remote syslog: https://docs.mongodb.com/manual/reference/configuration-options/#systemLog.destination
How can I log to something file-alike and a remote syslog using mongodb?