Skip to content

Commit bfe313b

Browse files
Merge remote-tracking branch 'couchbase/cheshire-cat'
* 6e29cf3 MB-47979: use correct function argument * 7855cd0 MB-47505 Add try catch block around io_lib:format/3 Change-Id: I8c21f2fbbc10990c8211235be8f3c48ec13475b0
2 parents efe5116 + 6e29cf3 commit bfe313b

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

deps/ale/src/ale_codegen.erl

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,21 @@ generic_loglevel(LoggerName, LogLevel, Formatter, Preformatted, Raw) ->
126126
true ->
127127
io_lib:format(
128128
"Info = ale_utils:assemble_info(~s, ~p, M, F, L, Data),"
129-
"UserMsg = case Args =/= [] of"
130-
" true ->"
131-
" CharsLimit = proplists:get_value(chars_limit, Opts, ~B),"
132-
" io_lib:format(Fmt, Args, [{chars_limit, CharsLimit}]);"
133-
" false -> Fmt"
134-
" end,",
129+
"UserMsg = case Args =/= [] of~n"
130+
" true ->~n"
131+
" CharsLimit = proplists:get_value(chars_limit, Opts, ~B),~n"
132+
" %% io_lib:format/3 has had bugs and therefore~n"
133+
" %% to avoid any logging errors, the following~n"
134+
" %% try catch block has been added.~n"
135+
" %% https://github.com/erlang/otp/issues/5053~n"
136+
" try~n"
137+
" io_lib:format(Fmt, Args, [{chars_limit, CharsLimit}])~n"
138+
" catch~n"
139+
" _:_ ->~n"
140+
" io_lib:format(Fmt, Args)~n"
141+
" end;~n"
142+
" false -> Fmt~n"
143+
" end,~n",
135144
[LoggerName, LogLevel, ?CHARS_LIMIT_DEFAULT]);
136145
false ->
137146
""

priv/public/ui/app/mn_admin/mn_roles_controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function mnRolesController($scope, poolDefault, mnHelper, $uibModal, permissions
2323
function activate() {
2424
if (poolDefault.saslauthdEnabled) {
2525
mnPromiseHelper(vm, mnUserRolesService.getSaslauthdAuth())
26-
.applyToScope(v => vm.isSaslauthdAuthEnabled = saslauthdAuth.enabled);
26+
.applyToScope(v => vm.isSaslauthdAuthEnabled = v.enabled);
2727
}
2828

2929
if (permissions.cluster.admin.security.external.read &&

0 commit comments

Comments
 (0)