Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Abap OO Logging

Former Member
0 Kudos

Currently I know of the bal_log_***** function FM and another logging class that utilizes the 'bal' FM called cl_sbal_logger.

Personally I don't think this is enough for a logging class. I would like to see abap do something similar to the java.util.logging package and the log4j package. Does anyone know if SAP has implemented something like this in abap already?

5 REPLIES 5

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

What is the functionality that you are missing from bal_log_***** in comparison with log4j  .

By the way there is Apache Log4j 2.2

Regards.

0 Kudos

Honestly I can't think of anything specific to log4j. I was just wondering if there had been a similar implementation in abap. Log4j is more complex than the standard java logger and i'd settle for something that resembled the standard java logger.

Maybe I should ask the question back, what log4j functionality would you suggest could be valuable to an abap implementation of a logger?

0 Kudos

Hi,

Implementing java.util.logging.Level would be helpful so we can use setFilter (for debugging etc.)

By the way thanks for mentioning CL_SBAL_LOGGER I was not aware of its existence .

Regards .

0 Kudos

The cl_sbal_logger is nice, wish it had a method for just logging strings but that's what subclasses are for.

The package SZAL contains all the BAL function modules, which i didn't know existed till yesterday. Check there if the cl_sbal_logger doesn't provide enough functionality.

Set filter for debugging, interesting, i'll look into that.

Cheers Eitan, and thank you for the idea.

Former Member
0 Kudos

For logging one could use also the ABAP statement LOG-POINT ID. But I'm not sure I'm not sure if you can get more value of it when comparing to slg1.