Skip to content

Commit fbcd5a9

Browse files
Migrate to new log api
1 parent bf7476f commit fbcd5a9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

deps/rabbitmq_auth_backend_oauth2/src/rabbit_auth_backend_oauth2.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ authenticate(_, AuthProps0) ->
158158
false ->
159159
case oauth2_client:introspect_token(Token0) of
160160
{ok, Tk1} ->
161-
rabbit_log:debug("Successfully introspected token : ~p", [Tk1]),
161+
?LOG_DEBUG("Successfully introspected token : ~p", [Tk1]),
162162
{ok, Tk1};
163163
{error, Err1} ->
164-
rabbit_log:error("Failed to introspected token due to ~p", [Err1]),
164+
?LOG_ERROR("Failed to introspected token due to ~p", [Err1]),
165165
{error, Err1}
166166
end
167167
end,
@@ -494,6 +494,6 @@ resolve_scope_var(Elem, Token, Vhost) ->
494494
-spec tags_from(decoded_jwt_token()) -> list(atom()).
495495
tags_from(DecodedToken) ->
496496
Scopes = maps:get(?SCOPE_JWT_FIELD, DecodedToken, []),
497-
rabbit_log:debug("tags_from Scopes : ~p", [Scopes]),
497+
?LOG_DEBUG("tags_from Scopes : ~p", [Scopes]),
498498
TagScopes = filter_matching_scope_prefix_and_drop_it(Scopes, ?TAG_SCOPE_PREFIX),
499499
lists:usort(lists:map(fun rabbit_data_coercion:to_atom/1, TagScopes)).

deps/rabbitmq_auth_backend_oauth2/src/uaa_jwt.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ get_jwk(KeyId, InternalOAuthProvider, AllowUpdateJwks) ->
148148
_ -> {error, unknown_signing_key_type}
149149
end;
150150
SK ->
151-
rabbit_log:debug("Opaque token Signing key ~p found", [KeyId]),
151+
?LOG_DEBUG("Opaque token Signing key ~p found", [KeyId]),
152152
{ok, SK#signing_key.key}
153153
end.
154154

deps/rabbitmq_management/src/rabbit_mgmt_wm_oauth_introspect.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ content_types_provided(ReqData, Context) ->
3838
{rabbit_mgmt_util:responder_map(to_json), ReqData, Context}.
3939

4040
do_it(ReqData, Context) ->
41-
rabbit_log:debug("Requested introspect token via management api"),
41+
?LOG_DEBUG("Requested introspect token via management api"),
4242
case cowboy_req:parse_header(<<"authorization">>, ReqData) of
4343
{bearer, Token} ->
4444
case oauth2_client:introspect_token(Token) of
4545
{error, introspected_token_not_valid} ->
46-
rabbit_log:error("Failed to introspect token due to ~p", [introspected_token_not_valid]),
46+
?LOG_ERROR("Failed to introspect token due to ~p", [introspected_token_not_valid]),
4747
rabbit_mgmt_util:not_authorised("Introspected token is not active", ReqData, Context);
4848
{error, Reason} ->
49-
rabbit_log:error("Failed to introspect token due to ~p", [Reason]),
49+
?LOG_ERROR("Failed to introspect token due to ~p", [Reason]),
5050
rabbit_mgmt_util:not_authorised(Reason, ReqData, Context);
5151
{ok, JwtPayload} ->
5252
case oauth2_client:sign_token(JwtPayload) of

0 commit comments

Comments
 (0)