Get existing logger - SchwarzIT/sap-usi-logging-api GitHub Wiki
This method will return the latest log writer instance created by the factory. This allows us to get an already existing logger anywhere down the call chain without having to pass it from method to method. This method was provided to make the integration into legacy code easier.
DATA(logger) = /usi/cl_bal_factory=>get_instance( )->get_existing_logger( ).
Regular behavior
Returns the latest log writer instance created by the factory.
Error handling
If - for some reason - the logger has not yet been initialized, the method will internally create a new logger and bind the singleton. It will use the default log object (see: Troubleshooting -> Log cannot be found) to do so.