log_mf_h(3erl)
π NAME π
log_mf_hβ an event handler that logs events to disk. iconic behavior, no cap.
Also hi bestie, this is the Erlang Module Definition page for log_mf_h(3erl) β manual name folded in like a little name tag π«Ά.
π DESCRIPTION π
Okay so this module is a gen_event handler module that can be installed in any gen_event 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 (rb(3erl)) 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 index, and report files 1, 2, .... slay, organized chaos β¨
π DATA TYPES π
πΈ args() πΈ
A term to be sent to gen_event:add_handler/3. that's the whole vibe of it π
β¨ EXPORTS β¨
π init(Dir, MaxBytes, MaxFiles) -> Args
π init(Dir, MaxBytes, MaxFiles, Pred) -> Args
Types:
Dir = file:filename()
MaxBytes = integer() >= 0
MaxFiles = 1..255
Pred = fun((Event :: term()) -> boolean())
Args = args()
Initiates the event handler. Returns Args, which is to be used in a call to gen_event:add_handler(EventMgr, log_mf_h, Args).
Dirβ specifies which directory to use for the log files.MaxBytesβ specifies the size of each individual file.MaxFilesβ specifies how many files are used.Predβ a predicate function used to filter the events. If no predicate function is specified, all events are logged.
literally the whole setup: give it a directory, a byte limit, a file count, and optionally a filter. obsessed π¦
π¦ SEE ALSO π¦
go read those too, iykyk π
okay that's the page bestie β source/version: Ericsson AB, stdlib 4.3.1.3, manual name: log_mf_h(3erl). bye and stay logged πβ¨π
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms