[erlang-questions] The best way to write user-friendly log from an OTP application
Sergey A.
n39052@REDACTED
Wed Nov 12 01:13:42 CET 2008
Thanks, for your answer.
> You might want to look at logger.erl and disk_log_h.erl in jungerl.
Thanks, I'll take a look.
> We use the error_logger to print crashes and other internal errors.
> This log *should* always be empty, otherwise we have a bug in our
> system. We use the logger.erl and disk_log_h.erl modules for this
> log.
>
> Then we have a set of logs for the user (audit logs etc.) and for
> these we use explicit calls in the code.
Thanks! Your answer has shown me the benefits of such a separating. I
need only to log crashes, so using error_logger:error_report/2 in
conjunction with gen_event callback (for catching all the well-known
errors and writing "user-friendly" logs for admins) seems to be a good
solution for me.
--
Sergey.
More information about the erlang-questions
mailing list