Implemented logger callback on mailstream to provide a better logging system.