Add the ability to specify `$node` in log formatter format string

Author: lukebakkenCreated Apr 4, 2024Updated Sep 15, 2026
Labelsenhancement

Is your feature request related to a problem? Please describe.

In VESC-1100, one challenge we are facing is that the customer aggregates log lines from all nodes in their cluster into the log aggregation system, with no way to separate log lines by node. Thus, when providing logs, lines are interleaved between nodes.

Since this seems to be a common scenario in k8s environments, we should allow the ability to specify $node in the format statement for log lines.

Describe the solution you'd like

Allow a format string like this:

log.console.formatter.plaintext.format = $node $time [$level] $pid $msg

Describe alternatives you've considered

You can already specify a constant string in the format string:

log.console.formatter.plaintext.format = rmq0 $time [$level] $pid $msg

However, this means that the configuration file must be templated before the node starts.

Additional context

See VESC-1100

Source: rabbitmq/rabbitmq-server