43
43
report files <c>1, 2, ....</c>.
49
<desc><p>Term to be sent to <seealso marker="gen_event#add_handler/3">
50
gen_event:add_handler/3</seealso>.</p></desc>
48
<name>init(Dir, MaxBytes, MaxFiles)</name>
49
<name>init(Dir, MaxBytes, MaxFiles, Pred) -> Args</name>
55
<name name="init" arity="3"/>
56
<name name="init" arity="4"/>
50
57
<fsummary>Initiate the event handler</fsummary>
53
<v>MaxBytes = integer()</v>
54
<v>MaxFiles = 0 < integer() < 256</v>
55
<v>Pred = fun(Event) -> boolean()</v>
60
59
<p>Initiates the event handler. This function returns
61
<c>Args</c>, which should be used in a call to
62
<c>gen_event:add_handler(EventMgr, log_mf_h, Args)</c>.
60
<c><anno>Args</anno></c>, which should be used in a call to
61
<c>gen_event:add_handler(EventMgr, log_mf_h, <anno>Args</anno>)</c>.
64
<p><c>Dir</c> specifies which directory to use for the log
65
files. <c>MaxBytes</c> specifies the size of each individual
66
file. <c>MaxFiles</c> specifies how many files are
67
used. <c>Pred</c> is a predicate function used to filter the
63
<p><c><anno>Dir</anno></c> specifies which directory to use for the log
64
files. <c><anno>MaxBytes</anno></c> specifies the size of each individual
65
file. <c><anno>MaxFiles</anno></c> specifies how many files are
66
used. <c><anno>Pred</anno></c> is a predicate function used to filter the
68
67
events. If no predicate function is specified, all events are