[erlang-questions] any way to avoid *.config file for sasl?

Motiejus Jakštys desired.mta@REDACTED
Thu Nov 1 12:27:46 CET 2012


Hi,

a session is worth a thousand words:

motiejus@REDACTED> erl
Erlang R15B02 (erts-5.9.2) [source] [smp:2:2] [async-threads:0]
[kernel-poll:false]

Eshell V5.9.2  (abort with ^G)

1> application:set_env(sasl, sasl_error_logger, false).
ok
2> application:start(sasl).
ok
3> 
=PROGRESS REPORT==== 1-Nov-2012::10:51:32 ===
          supervisor: {local,sasl_safe_sup}
             started: [{pid,<0.41.0>},
                       {name,alarm_handler},
                       {mfargs,{alarm_handler,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]
...
3> application:get_env(sasl, sasl_error_logger).
{ok,tty}
4>

Conclusion is: if the value (in this case sasl_error_logger) is defined
in sasl.app, on application startup the value set by
application:set_env/3 is overwritten by the value from the .app file.
That means that if I want to change the value of sasl_error_logger, I
*must* use -config FILE when starting Erlang.

Is there any other way to change that value in a running system, before
starting sasl?

Best regards,
Motiejus



More information about the erlang-questions mailing list