How to get the console logs of gatling load test into program?

I have to send the load test result as rest api result. I would like to get the gatling logs shown in the console into program.