Addition of Erlang dep causing SASL logging

erlang

#1

I just added Fuse as a dependency to my project (it’s an Erlang project). When I boot my application in the console now I get SASL logs printed for everything, progress reports, crashes, etc. The application is running fine, but this is weird. Has this happened to anyone before?

$iex -S mix
Erlang/OTP 20 [erts-9.0.5] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

==> common
Compiling 1 file (.ex)
Generated common app
=PROGRESS REPORT==== 11-Oct-2017::00:22:32 ===
          supervisor: {local,sasl_safe_sup}
             started: [{pid,<0.635.0>},
                       {id,alarm_handler},
                       {mfargs,{alarm_handler,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 11-Oct-2017::00:22:32 ===
          supervisor: {local,sasl_sup}
             started: [{pid,<0.634.0>},
                       {id,sasl_safe_sup},
                       {mfargs,
                           {supervisor,start_link,
                               [{local,sasl_safe_sup},sasl,safe]}},
                       {restart_type,permanent},
                       {shutdown,infinity},
                       {child_type,supervisor}]

and on and on…


#2

Perhaps this earlier thread can help: How to suppress "PROGRESS REPORT" statements on stdout


#3

Hmm, seems to be the same issue. But that workaround won’t work for me :confused:


#4

Maybe you can rebuild Erlang with different flags to hide SASL logging like the previous poster?


#5

Actually, I don’t think that issue is mine. I’ve got tons over Erlang dependencies, but just this one caused the SASL logs. Non-standard installations would be walking down a path I don’t really want to go.


#6

That’s fair enough. I hope you get a better answer. :slight_smile:


#7

Thanks for the help! :smile:


#8

The reason why sasl is started in the first place is this line. sasl is marked as a dependency of fuse so it needs to be started for fuse to start.
Why is that so is something you should check with Jesper :wink:

Being an Erlang dev myself, I’m not sure how this is achieved in Elixir but, based on this docs, I think one thing you can do to prevent logs from displaying on your console is to add this to your config.exs:

config :sasl, sasl_error_logger: :false

…or…

config :sasl, errlog_type: :error

Hope this helps :slight_smile:


#9

Your reputation precedes you! I’ve been enjoying your work on the Inaka blog for some time now. Thank you for the response! It suppressed SASL log output.


#10

For anyone interested, SASL is required to handle alarms set off by Fuse: https://github.com/jlouis/fuse/issues/32