Can we post the Travis CI build failure reason to slack?

We wanted to know the reason why the build is failed from the notification received to slack. Is it possible to get the failure message from logs and add that in the template to send to slack?