I am not sure if this is what you are looking for. But if you read about the _debug macro in stored process it would help generate your required log.
Ready to join fellow brilliant minds for the SAS Hackathon?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.