I developed a logger handler that redirects JSON formatted logs to a remote server on the internet.
In the logger user’s guide there is mention of overload protection for the default logger handlers Erlang -- Logging .
Apparently this is implemented in the logger_olp
module that is used by the logger_h_common
callbacks. I read the code in logger_disk_log_h
and the OLP management for the standard OTP handlers is provided by logger_h_common:log/2
that in turn calls logger_olp:load/2
.
I was wondering whether by starting a logger_olp
instance and directly calling logger_olp:load/2
from a custom handler would be enough to provide the same kind of overload protection.
I would also provide the proper handling of stop/termination of the OLP server.
Do you think that using the undocumented OLP modules is feasible or that would be better to develop my own overload protection method?