Bläddra i källkod

ft: 代码修改

master
SisMaker 3 år sedan
förälder
incheckning
3cc66fcf79
1 ändrade filer med 15 tillägg och 15 borttagningar
  1. +15
    -15
      src/gen_mpp.erl

+ 15
- 15
src/gen_mpp.erl Visa fil

@ -8,7 +8,7 @@
-import(gen_call, [gcall/3, gcall/4, greply/2]).
-export([
%% API for gen_apu
%% API for gen_mpp
start/3, start/4, start_link/3, start_link/4
, start_monitor/3, start_monitor/4
, stop/1, stop/3
@ -238,9 +238,9 @@ init_it(Starter, Parent, ServerRef, Module, Args, Options) ->
%%-----------------------------------------------------------------
%% enter_loop(Module, Options, State, <ServerName>, <TimeOut>) ->_
%%
%% Description: Makes an existing process into a gen_apu.
%% The calling process will enter the gen_apu receive
%% loop and become a gen_apu process.
%% Description: Makes an existing process into a gen_mpp.
%% The calling process will enter the gen_mpp receive
%% loop and become a gen_mpp process.
%% The process *must* have been started using one of the
%% start functions in proc_lib, see proc_lib(3).
%% The user is responsible for any initialization of the
@ -936,8 +936,8 @@ try_terminate(Mod, Reason, State) ->
catch
throw:R ->
{ok, R};
Class:R ->
{'EXIT', Class, R, ?STACKTRACE()}
Class:R:S ->
{'EXIT', Class, R, S}
end;
false ->
{ok, ok}
@ -953,7 +953,7 @@ error_info(_Reason, application_controller, _From, _Msg, _Mod, _State, _Debug) -
ok;
error_info(Reason, Name, From, Msg, Module, Debug, State) ->
Log = sys:get_log(Debug),
?LOG_ERROR(#{label => {gen_apu, terminate},
?LOG_ERROR(#{label => {gen_mpp, terminate},
name => Name,
last_message => Msg,
state => format_status(terminate, Module, get(), State),
@ -962,8 +962,8 @@ error_info(Reason, Name, From, Msg, Module, Debug, State) ->
client_info => client_stacktrace(From)},
#{
domain => [otp],
report_cb => fun gen_apu:format_log/2,
error_logger => #{tag => error, report_cb => fun gen_apu:format_log/1}
report_cb => fun gen_mpp:format_log/2,
error_logger => #{tag => error, report_cb => fun gen_mpp:format_log/1}
}),
ok.
@ -999,7 +999,7 @@ format_log(Report) ->
limit_report(Report, unlimited) ->
Report;
limit_report(#{label := {gen_apu, terminate},
limit_report(#{label := {gen_mpp, terminate},
last_message := Msg,
state := State,
log := Log,
@ -1013,7 +1013,7 @@ limit_report(#{label := {gen_apu, terminate},
reason => io_lib:limit_term(Reason, Depth),
client_info => limit_client_report(Client, Depth)
};
limit_report(#{label := {gen_apu, no_handle_info},
limit_report(#{label := {gen_mpp, no_handle_info},
message := Msg} = Report, Depth) ->
Report#{message => io_lib:limit_term(Msg, Depth)}.
@ -1040,7 +1040,7 @@ format_log(Report, FormatOpts0) ->
{Format, Args} = format_log_single(Report, FormatOpts),
io_lib:format(Format, Args, IoOpts).
format_log_single(#{label := {gen_apu, terminate},
format_log_single(#{label := {gen_mpp, terminate},
name := Name,
last_message := Msg,
state := State,
@ -1063,7 +1063,7 @@ format_log_single(#{label := {gen_apu, terminate},
end,
{Format1 ++ ServerLogFormat ++ ClientLogFormat,
Args1 ++ ServerLogArgs ++ ClientLogArgs};
format_log_single(#{label := {gen_apu, no_handle_info},
format_log_single(#{label := {gen_mpp, no_handle_info},
module := Module,
message := Msg},
#{single_line := true, depth := Depth} = FormatOpts) ->
@ -1081,7 +1081,7 @@ format_log_single(#{label := {gen_apu, no_handle_info},
format_log_single(Report, FormatOpts) ->
format_log_multi(Report, FormatOpts).
format_log_multi(#{label := {gen_apu, terminate},
format_log_multi(#{label := {gen_mpp, terminate},
name := Name,
last_message := Msg,
state := State,
@ -1116,7 +1116,7 @@ format_log_multi(#{label := {gen_apu, terminate},
end ++ ClientArgs
end,
{Format, Args};
format_log_multi(#{label := {gen_apu, no_handle_info},
format_log_multi(#{label := {gen_mpp, no_handle_info},
module := Module,
message := Msg},
#{depth := Depth} = FormatOpts) ->

Laddar…
Avbryt
Spara