Posts

Showing posts from November, 2019

ABAP logging made easy using simple logger utility class ZCL_LOGGER

In the last post,  Application logging in ABAP . I talked about application logging. It's an excellent utility but it's cumbersome from a developer's point of you. Especially if you work or have worked with languages like JavaScript where logging is as easy as Console.log("your text"). to add the same level of ease, I created a utility class that makes logging easy. Starting a log is as easy as instantiating the object. Below is the example : Adding messages to the log becomes a single line code: Here is the snippet to save the log. Notice how you don't have to worry about saving the log messages.. because the class saves your messages the moment you add them, so you don't have to worry about collecting your logs and making sure the save happens in all scenarios. Now I will take the same code snippet that I shared in the last post and rewrite it using the logger class to show how convenient it is to use the