To be able output warnings, error and notice messages in our modules we have to use the following interface \Magento\Framework\Message\ManagerInterface.

The best way to use it is through Dependency Inyection in out constructos as follow:

Continue reading...