Ten thousand lines of logging when starting TLS connection

Since upgrading to OTP-25, whenever a TLS connection is started, this causes an extreme amount of logging:

=PROGRESS REPORT==== 24-Jan-2023::10:29:24.145614 ===                                                                                                                                                                                                                                                                                                                                                                                       
    supervisor: {<0.849.0>,tls_dyn_connection_sup}                                                                                                                                                                                                                                                                                                                                                                                          
    started: [{pid,<0.852.0>},                                                                             
                       {#{alpn_preferred_protocols => undefined,                                           
                          sni_hosts => [],early_data => undefined,                                         
                          hibernate_after => infinity,                                                     
                          ciphers =>                                                                       
                          ..... more than 10.000 lines removed ...

The majority of the 10000 (!) lines of logging is caused by a dump of the cacerts. This makes debugging very difficult, since it completely overflows the terminal.

Has anyone else seen this, and is there a solution?


I guess the easiest way to get rid of them is to not use SASL logs. Perhaps we can mitigate this in the future. Personally, I think all progress reports in SASL ought to be debug-level logging but this is legacy that is hard to change.

1 Like

We have this problem as well. As soon as we use some TLS configuration, all cacerts are logged in the SASL logs on info level.

To temporarily fix this, one can disable the progress logs with the following sys.config:

    {kernel, [
        {logger, [
            {handler, default, logger_std_h, #{
                filter_default => log,
                filters => [
                    {disable_progress, {fun logger_filters:progress/2, stop}}

(Note that this is just a minimal configuration, the default configuration for the default handler is actually a bit different:

1> logger:get_handler_config(default).
{ok,#{config => ...,
      filter_default => stop,
      filters =>
          [{remote_gl,{fun logger_filters:remote_gl/2,stop}},
           {domain,{fun logger_filters:domain/2,
           {no_domain,{fun logger_filters:domain/2,
      formatter =>
          {logger_formatter,#{legacy_header => true,single_line => false}},
      id => default,level => all,module => logger_std_h}}
1 Like