1log_mf_h(3)                Erlang Module Definition                log_mf_h(3)
2
3
4

NAME

6       log_mf_h - An event handler that logs events to disk.
7

DESCRIPTION

9       This  module is a gen_event handler module that can be installed in any
10       gen_event process. It logs onto disk all events that  are  sent  to  an
11       event  manager. Each event is written as a binary, which makes the log‐
12       ging very fast. However, a tool such as the Report Browser (rb(3)) must
13       be  used  to  read the files. The events are written to multiple files.
14       When all files have been used, the first one is reused and overwritten.
15       The  directory location, the number of files, and the size of each file
16       are configurable. The directory will include one file called index, and
17       report files 1, 2, ....
18

DATA TYPES

20       args()
21
22              Term to be sent to gen_event:add_handler/3.
23

EXPORTS

25       init(Dir, MaxBytes, MaxFiles) -> Args
26
27       init(Dir, MaxBytes, MaxFiles, Pred) -> Args
28
29              Types:
30
31                 Dir = file:filename()
32                 MaxBytes = integer() >= 0
33                 MaxFiles = 1..255
34                 Pred = fun((Event :: term()) -> boolean())
35                 Args = args()
36
37              Initiates  the  event handler. Returns Args, which is to be used
38              in a call to gen_event:add_handler(EventMgr, log_mf_h, Args).
39
40              Dir specifies which directory to use for the log files. MaxBytes
41              specifies  the  size of each individual file. MaxFiles specifies
42              how many files are used. Pred is a predicate  function  used  to
43              filter  the  events.  If no predicate function is specified, all
44              events are logged.
45

SEE ALSO

47       gen_event(3), rb(3)
48
49
50
51Ericsson AB                     stdlib 3.14.2.1                    log_mf_h(3)
Impressum