From 6051ea92eb683610e3045dbb0eb569a5102d22c0 Mon Sep 17 00:00:00 2001 From: zhouzb Date: Fri, 24 Sep 2021 17:24:04 +0800 Subject: [PATCH] chore(authn): improve log --- apps/emqx/src/emqx_authentication.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/emqx/src/emqx_authentication.erl b/apps/emqx/src/emqx_authentication.erl index 40af0e7b7..3e98fb548 100644 --- a/apps/emqx/src/emqx_authentication.erl +++ b/apps/emqx/src/emqx_authentication.erl @@ -303,7 +303,7 @@ authenticate(#{listener := Listener, protocol := Protocol} = Credential, _AuthRe do_authenticate([], _) -> {stop, {error, not_authorized}}; -do_authenticate([#authenticator{provider = Provider, state = #{'_unique' := Unique} = State} | More], Credential) -> +do_authenticate([#authenticator{id = ID, provider = Provider, state = State} | More], Credential) -> try Provider:authenticate(Credential, State) of ignore -> do_authenticate(More, Credential); @@ -316,7 +316,7 @@ do_authenticate([#authenticator{provider = Provider, state = #{'_unique' := Uniq {stop, Result} catch error:Reason:Stacktrace -> - ?LOG(warning, "The following error occurred in '~s' during authentication: ~p", [Unique, {Reason, Stacktrace}]), + ?LOG(warning, "The following error occurred in '~s' during authentication: ~p", [ID, {Reason, Stacktrace}]), do_authenticate(More, Credential) end.