samsonasik / ErrorHeroModule

:gem: A Hero for your Zend Framework/Laminas, and Expressive/Mezzio application to log ( DB and Mail ) and handle php errors & exceptions during Mvc process/between request and response
MIT License
50 stars 7 forks source link

Mqtt feature #28

Closed pierrejochem closed 6 years ago

pierrejochem commented 6 years ago

Mqtt sending feature

samsonasik commented 6 years ago

missing test and need to have updated/added at spec directory, I'm using kahlan

pierrejochem commented 6 years ago

Working on the changes and will add the test(s)

pierrejochem commented 6 years ago

Could you give me an advise for kahlan please? I've search for something for the email functionality so I can orientate on it or use it as template for the mqtt stuff, but can not find it.

samsonasik commented 6 years ago

you can create new integration test for it with new fixture config and new integration via error preview class, for example, on enable email:

To do this, you need to add "mcfish/libmqtt": ^1.0.1 to require-dev for using Client class (testing purpose) and suggest to suggest when user want to use mqtt notification.

samsonasik commented 6 years ago

after more thinking about it, I think you can just create custom Writer, register service under log_writers, then add the writer under log -> ErrorHeroModuleLogger -> writers`, hence I close it ;)

pierrejochem commented 6 years ago

I will check this out. Thank you. I had my code finished, but problems with kahlan