5454-module (amqp_channel ).
5555
5656-include (" amqp_client_internal.hrl" ).
57+ -include_lib (" kernel/include/logger.hrl" ).
5758
5859-behaviour (gen_server ).
5960
@@ -514,35 +515,35 @@ handle_info({bump_credit, Msg}, State) ->
514515 {noreply , State };
515516% % @private
516517handle_info (timed_out_flushing_channel , State ) ->
517- ? LOG_WARN (" Channel (~tp ) closing: timed out flushing while "
518- " connection closing" , [self ()]),
518+ ? LOG_WARNING (" Channel (~tp ) closing: timed out flushing while "
519+ " connection closing" , [self ()]),
519520 {stop , timed_out_flushing_channel , State };
520521% % @private
521522handle_info ({'DOWN' , _ , process , ReturnHandler , shutdown },
522523 State = # state {return_handler = {ReturnHandler , _Ref }}) ->
523524 {noreply , State # state {return_handler = none }};
524525handle_info ({'DOWN' , _ , process , ReturnHandler , Reason },
525526 State = # state {return_handler = {ReturnHandler , _Ref }}) ->
526- ? LOG_WARN (" Channel (~tp ): Unregistering return handler ~tp because it died. "
527- " Reason: ~tp " , [self (), ReturnHandler , Reason ]),
527+ ? LOG_WARNING (" Channel (~tp ): Unregistering return handler ~tp because it died. "
528+ " Reason: ~tp " , [self (), ReturnHandler , Reason ]),
528529 {noreply , State # state {return_handler = none }};
529530% % @private
530531handle_info ({'DOWN' , _ , process , ConfirmHandler , shutdown },
531532 State = # state {confirm_handler = {ConfirmHandler , _Ref }}) ->
532533 {noreply , State # state {confirm_handler = none }};
533534handle_info ({'DOWN' , _ , process , ConfirmHandler , Reason },
534535 State = # state {confirm_handler = {ConfirmHandler , _Ref }}) ->
535- ? LOG_WARN (" Channel (~tp ): Unregistering confirm handler ~tp because it died. "
536- " Reason: ~tp " , [self (), ConfirmHandler , Reason ]),
536+ ? LOG_WARNING (" Channel (~tp ): Unregistering confirm handler ~tp because it died. "
537+ " Reason: ~tp " , [self (), ConfirmHandler , Reason ]),
537538 {noreply , State # state {confirm_handler = none }};
538539% % @private
539540handle_info ({'DOWN' , _ , process , FlowHandler , shutdown },
540541 State = # state {flow_handler = {FlowHandler , _Ref }}) ->
541542 {noreply , State # state {flow_handler = none }};
542543handle_info ({'DOWN' , _ , process , FlowHandler , Reason },
543544 State = # state {flow_handler = {FlowHandler , _Ref }}) ->
544- ? LOG_WARN (" Channel (~tp ): Unregistering flow handler ~tp because it died. "
545- " Reason: ~tp " , [self (), FlowHandler , Reason ]),
545+ ? LOG_WARNING (" Channel (~tp ): Unregistering flow handler ~tp because it died. "
546+ " Reason: ~tp " , [self (), FlowHandler , Reason ]),
546547 {noreply , State # state {flow_handler = none }};
547548handle_info ({'DOWN' , _ , process , QPid , _Reason }, State ) ->
548549 rabbit_amqqueue_common :notify_sent_queue_down (QPid ),
@@ -591,13 +592,13 @@ handle_method_to_server(Method, AmqpMsg, From, Sender, Flow,
591592 {noreply , rpc_top_half (Method , build_content (AmqpMsg ),
592593 From , Sender , Flow , State1 )};
593594 {ok , none , BlockReply } ->
594- ? LOG_WARN (" Channel (~tp ): discarding method ~tp in cast.~n "
595+ ? LOG_WARNING (" Channel (~tp ): discarding method ~tp in cast.~n "
595596 " Reason: ~tp " , [self (), Method , BlockReply ]),
596597 {noreply , State };
597598 {ok , _ , BlockReply } ->
598599 {reply , BlockReply , State };
599600 {{_ , InvalidMethodMessage }, none , _ } ->
600- ? LOG_WARN (" Channel (~tp ): ignoring cast of ~tp method. " ++
601+ ? LOG_WARNING (" Channel (~tp ): ignoring cast of ~tp method. " ++
601602 InvalidMethodMessage ++ " " , [self (), Method ]),
602603 {noreply , State };
603604 {{InvalidMethodReply , _ }, _ , _ } ->
@@ -779,9 +780,9 @@ handle_method_from_server1(
779780 # 'basic.return' {} = BasicReturn , AmqpMsg ,
780781 State = # state {return_handler = ReturnHandler }) ->
781782 _ = case ReturnHandler of
782- none -> ? LOG_WARN (" Channel (~tp ): received {~tp , ~tp } but there is "
783- " no return handler registered" ,
784- [self (), BasicReturn , AmqpMsg ]);
783+ none -> ? LOG_WARNING (" Channel (~tp ): received {~tp , ~tp } but there is "
784+ " no return handler registered" ,
785+ [self (), BasicReturn , AmqpMsg ]);
785786 {Pid , _Ref } -> Pid ! {BasicReturn , AmqpMsg }
786787 end ,
787788 {noreply , State };
@@ -794,7 +795,7 @@ handle_method_from_server1(#'basic.ack'{} = BasicAck, none,
794795 {noreply , update_confirm_set (BasicAck , State )};
795796handle_method_from_server1 (# 'basic.nack' {} = BasicNack , none ,
796797 # state {confirm_handler = none } = State ) ->
797- ? LOG_WARN (" Channel (~tp ): received ~tp but there is no "
798+ ? LOG_WARNING (" Channel (~tp ): received ~tp but there is no "
798799 " confirm handler registered" , [self (), BasicNack ]),
799800 {noreply , update_confirm_set (BasicNack , State )};
800801handle_method_from_server1 (# 'basic.nack' {} = BasicNack , none ,
@@ -834,7 +835,7 @@ handle_connection_closing(CloseType, Reason,
834835handle_channel_exit (Reason = # amqp_error {name = ErrorName , explanation = Expl },
835836 State = # state {connection = Connection , number = Number }) ->
836837 % % Sent by rabbit_channel for hard errors in the direct case
837- ? LOG_ERR (" connection ~tp , channel ~tp - error:~n~tp " ,
838+ ? LOG_ERROR (" connection ~tp , channel ~tp - error:~n~tp " ,
838839 [Connection , Number , Reason ]),
839840 {true , Code , _ } = ? PROTOCOL :lookup_amqp_exception (ErrorName ),
840841 ReportedReason = {server_initiated_close , Code , Expl },
@@ -930,7 +931,7 @@ server_misbehaved(#amqp_error{} = AmqpError, State = #state{number = Number}) ->
930931 {0 , _ } ->
931932 handle_shutdown ({server_misbehaved , AmqpError }, State );
932933 {_ , Close } ->
933- ? LOG_WARN (" Channel (~tp ) flushing and closing due to soft "
934+ ? LOG_WARNING (" Channel (~tp ) flushing and closing due to soft "
934935 " error caused by the server ~tp " , [self (), AmqpError ]),
935936 Self = self (),
936937 spawn (fun () -> call (Self , Close ) end ),
0 commit comments