I would like to have a specific prefix in front of every single syslog line in my Ubuntu servers (running nginx). The prefix should take the value from either some env-variable or one specific folder name. How to do it?
I see there is a syslog configuration file present but didn't see possibilities how to configure this accordingly. Found some rsyslog configuration from /etc/rsyslog.conf and as well from /etc/rsyslog.d/* but no clue how to configure it there.
EXAMPLE:
Let's say I have env variable evaluated as follows: PLUGIN_VERSION=32k0dkwfrghhaq3faiwejaf932.
I would now like this 32k0dkwfrghhaq3faiwejaf932 to be present in front of every single line in my syslog file.