By default, the Kernel application installs one log handler at system start. This handler is named default. It receives and processes standard log events produced by the Erlang runtime system, standard behaviours and different Erlang/OTP applications. The log events are by default printed to the terminal.
This is no lie - only standard log events produced by the Erlang runtime system, standard behaviours and different Erlang/OTP applications are logged, others are ignored.
What is the easiest way to configure the logger in such a way that it logs everything?
Even with the logger_level set to all (which is documented as a possible value, but without explanation of what it does, by the way), this still does not log when the logger is invoked with an RPC.
For example, I can log messages on node node_a:
(node_a@newspace)3> logger:info("Hello").
=INFO REPORT==== 5-Nov-2021::08:21:03.443058 ===
Hello
ok
Only when I do an RPC from node_b to node_a that ends up calling a running gen_server or other OTP behaviour that performs logging, that log output is visible again.
Yes, the logger has its own group leader as it can be called from many different groups on one node. E.g. when you start multiple shells (try CTRL-g and then s and c) each shell and processes it starts are in their own group.
Interesting – I was vaguely aware of the groupleader concept, but never really looked into it. Now I see that you can simply set the groupleader of a process to any process that implements the io protocol (Erlang -- The Erlang I/O Protocol) and have all I/O handled by that process.