@ -10,12 +10,18 @@
- compile ( inline ) .
- compile ( { inline_size , 128 } ) .
- compile ( [ export_all ] ) .
- export ( [
setHighWater / 1
, formatReason / 1
, formatMfa / 1
, formatArgs / 2
, suppress_supervisor_start_and_application_start / 1
, suppress_supervisor_start / 1
, suppress_application_start / 1
] ) .
- export ( [
@ -68,6 +74,9 @@ init([HighWaterMark, GlStrategy]) ->
Flush = lgUtil : get_env ( errLoggerFlushQueue , true ) ,
FlushThr = lgUtil : get_env ( errLoggerFlushThr , 20 ) ,
Shaper = #lgShaper { hwm = HighWaterMark , flushQueue = Flush , flushThr = FlushThr , filter = shaperFun ( ) , id = ? MODULE } ,
io : format ( " IMY*******************init1111111 ~p ~n " , [ Shaper ] ) ,
Raw = lgUtil : get_env ( errLoggerFmtRaw , false ) ,
Sink = configSink ( ) ,
{ ok , #state { sink = Sink , shaper = Shaper , groupleader_strategy = GlStrategy , raw = Raw } } .
@ -76,11 +85,10 @@ handle_call({mSetHighWater, N}, #state{shaper = Shaper} = State) ->
NewShaper = Shaper #lgShaper { hwm = N } ,
{ ok , ok , State #state { shaper = NewShaper } } ;
handle_call ( _ Request , State ) - >
io : format ( " IMY*********************handle_call111 " ) ,
{ ok , unknown_call , State } .
handle_event ( Event , #state { sink = Sink , shaper = Shaper } = State ) - >
io : format ( " IMY**********************111111111 ~p ~n " , [ Event ] ) ,
io : format ( " IMY**********************111111111 ~p ~p ~n " , [ Event , Shaper ] ) ,
case lgUtil : checkHwm ( Shaper , Event ) of
{ true , _ Drop , NewShaper } - >
io : format ( " IMY**********************1111111110-0000 ~p ~n " , [ Event ] ) ,
@ -573,26 +581,36 @@ shaperFun() ->
AppSS = lgUtil : get_env ( suppressAppStartStop , false ) ,
if
SupSS andalso AppSS - >
fun suppress_supervisor_start_and_application_start / 1 ;
io : format ( " IMY********************shaperFun11111111 " ) ,
fun ? MODULE : suppress_supervisor_start_and_application_start / 1 ;
SupSS - >
fun suppress_supervisor_start / 1 ;
io : format ( " IMY********************shaperFun22222 " ) ,
fun ? MODULE : suppress_supervisor_start / 1 ;
AppSS - >
fun suppress_application_start / 1 ;
io : format ( " IMY********************shaperFun33333333333 " ) ,
fun ? MODULE : suppress_application_start / 1 ;
true - >
fun ( _ ) - > false end
io : format ( " IMY********************shaperFun44444 " ) ,
undefined
end .
suppress_supervisor_start_and_application_start ( E ) - >
io : format ( " IMY********************Fun111111 " ) ,
suppress_supervisor_start ( E ) orelse suppress_application_start ( E ) .
suppress_application_start ( { info_report , _ GL , { _ Pid , std_info , D } } ) when is_list ( D ) - >
io : format ( " IMY********************Fun14324234 " ) ,
lists : member ( { exited , stopped } , D ) ;
suppress_application_start ( { info_report , _ GL , { _ P , progress , D } } ) - >
io : format ( " IMY********************Fun14332424 " ) ,
lists : keymember ( application , 1 , D ) andalso lists : keymember ( started_at , 1 , D ) ;
suppress_application_start ( _ ) - >
io : format ( " IMY********************Fun14334343 " ) ,
false .
suppress_supervisor_start ( { info_report , _ GL , { _ P , progress , D } } ) - >
io : format ( " IMY********************Fun324324 " ) ,
lists : keymember ( started , 1 , D ) andalso lists : keymember ( supervisor , 1 , D ) ;
suppress_supervisor_start ( _ ) - >
io : format ( " IMY********************Fun432432 " ) ,
false .