Just need to specify a full PHP class name. Example: https://github.com/espocrm/espocrm/i...ent-1837407174
You also can pass handler's contructor parameters in params, a key should correspond a constructor parameter name.
Using Monolog Handler for logging
Collapse
X
-
Thanks, could you please clarify how to use a different Monolog handler, e.g. the NativeMailerHandler? I see that the only handlers at Espo\\Core\\Log\\Handler are EspoFileHandler and EspoRotatingFileHandler.Leave a comment:
-
Yes. It's stated in the documentation. Espo\\Core\\Log\\Handler\\EspoRotatingFileHandler implements the Monolog handler interface. It's the same as using any monolog handler.
Leave a comment:
-
Using Monolog Handler for logging
Hello,
I would like to use a logging handler so that specified users are sent logs by email.
I have read the EspoCRM documentation page on logging (https://docs.espocrm.com/administration/log/), and see that it uses the Monolog library.
Looking in the Monolog documentation (https://github.com/Seldaek/monolog/b...-processors.md), I would like to use one of the mail handlers, e.g. NativeMailerHandler, possibly with a wrapper.
I see that the example in the EspoCRM documentation uses the handler at 'Espo\\Core\\Log\\Handler\\EspoRotatingFileHandler ', rather than using a Monolog handler.
Can you let me know whether and how it is possible to use a Monolog handler?
Thanks!Tags: None
Leave a comment: