.TH log_mf_h 3erl "stdlib 4.3.1.3" "Ericsson AB" "Erlang Module Definition" .SH NAME log_mf_h \- An event handler that logs events to disk. .SH DESCRIPTION .LP This module is a \fIgen_event\fR\& handler module that can be installed in any \fIgen_event\fR\& process\&. It logs onto disk all events that are sent to an event manager\&. Each event is written as a binary, which makes the logging very fast\&. However, a tool such as the Report Browser (\fIrb(3erl)\fR\&) must be used to read the files\&. The events are written to multiple files\&. When all files have been used, the first one is reused and overwritten\&. The directory location, the number of files, and the size of each file are configurable\&. The directory will include one file called \fIindex\fR\&, and report files \fI1, 2, \&.\&.\&.\fR\&\&. .SH DATA TYPES .nf \fBargs()\fR\& .br .fi .RS .LP Term to be sent to \fIgen_event:add_handler/3\fR\&\&. .RE .SH EXPORTS .LP .nf .B init(Dir, MaxBytes, MaxFiles) -> Args .br .fi .br .nf .B init(Dir, MaxBytes, MaxFiles, Pred) -> Args .br .fi .br .RS .LP Types: .RS 3 Dir = file:filename() .br MaxBytes = integer() >= 0 .br MaxFiles = 1\&.\&.255 .br Pred = fun((Event :: term()) -> boolean()) .br Args = args() .br .RE .RE .RS .LP Initiates the event handler\&. Returns \fIArgs\fR\&, which is to be used in a call to \fIgen_event:add_handler(EventMgr, log_mf_h, Args)\fR\&\&. .LP \fIDir\fR\& specifies which directory to use for the log files\&. \fIMaxBytes\fR\& specifies the size of each individual file\&. \fIMaxFiles\fR\& specifies how many files are used\&. \fIPred\fR\& is a predicate function used to filter the events\&. If no predicate function is specified, all events are logged\&. .RE .SH "SEE ALSO" .LP \fIgen_event(3erl)\fR\&, \fIrb(3erl)\fR\&