diff options
author | Richard Carlsson <[email protected]> | 2013-10-16 23:11:40 +0200 |
---|---|---|
committer | Richard Carlsson <[email protected]> | 2013-10-16 23:30:16 +0200 |
commit | e84e886d75698ab6af585959fead3fa3c0ca0168 (patch) | |
tree | 806a42f5daf810a774d07f27ed0b92d31191f5d3 /lib/sasl/src/sasl.erl | |
parent | 73d1b4a1cc5ef1898b650fc74063ab28bc85bcbf (diff) | |
download | otp-e84e886d75698ab6af585959fead3fa3c0ca0168.tar.gz otp-e84e886d75698ab6af585959fead3fa3c0ca0168.tar.bz2 otp-e84e886d75698ab6af585959fead3fa3c0ca0168.zip |
Don't try to add the log_mf_h handler in sasl unless configured to do so.
The functions add_error_logger_mf/1 and delete_error_logger_mf/1 in sasl.erl
are designed to do nothing if the handler configuration as returned by
get_error_logger_mf/0 is 'undefined'. However, that function returns a
triple {undefined,undefined,undefined} when the error_logger_mf_*
configurations have not been set. This makes SASL always try to add the
log_mf_h handler on startup, passing 'undefined' for each of the Dir, MaxB
and MaxF parameters. The gen_event callback function log_mf_h:init/1 will
then crash with a function_clause error, causing the handler to be silently
removed again. This patch fixes the problem by making get_error_logger_mf/0
return the single atom 'undefined' as it is expected to do.
Diffstat (limited to 'lib/sasl/src/sasl.erl')
-rw-r--r-- | lib/sasl/src/sasl.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sasl/src/sasl.erl b/lib/sasl/src/sasl.erl index 989f99dc82..fdea6da13e 100644 --- a/lib/sasl/src/sasl.erl +++ b/lib/sasl/src/sasl.erl @@ -82,8 +82,8 @@ get_mf() -> MaxB = get_mf_maxb(), MaxF = get_mf_maxf(), case {Dir, MaxB, MaxF} of - {undefined,undefined,undefined} = R -> - R; + {undefined,undefined,undefined} -> + undefined; {undefined,_,_} -> exit({missing_config, {sasl, error_logger_mf_dir}}); {_,undefined,_} -> |