Invalid formatting of logging messages when using slave nodes

I am using various Erlang slaves nodes for integration tests. They are running locally on my computer.

When using calls such as Logger.info, the message do not use the formatting defined in config/config.ex. Instead they use some sort of default formatting, like this:

17:20:14.716 [info] Connecting to 'localhost' on 1234

The formatting is defined like this:

config :logger, :console,
  metadata: [:module, :pid],
  format: "$date $time $metadata[$level]$levelpad: $message\n"

I pushed this configuration on the slave node but it did not solve the problem. Any ideas?

Answering my own question… I was able to solve the problem by using a call to Logger.backend_configure on the remote node. Something similar to that:

rpc(node, Logger, :configure_backend,
      [:console, Application.fetch_env!(:logger, :console)])