2015 Mar 04 4:50 PM
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?
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?
2015 Mar 04 6:09 PM
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.
2015 Mar 04 6:51 PM
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?
2015 Mar 05 6:05 AM
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 .
2015 Mar 05 5:41 PM
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.
2015 Mar 04 9:37 PM
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.