We have a Java application logging structured data (MDC with log4j) via syslog to rsyslog (7.6.3) on localhost. localhost should then forward these log messages to a central logging host (also running rsyslog (7.4.4)) which will format the log messages and distribute them into files.
The problem is that we see the structured data on localhost (by logging
%rawmsg% to a file), but there is no structured data in the
%rawmsg% as received on the logging server. The forwading is done via UDP.
How can we transfer the structured data as structured data via rsyslog?