Hi Iliyan;
I have never tried this with LOG4Net but have successfully consumed various .Net classes and methods in PB's .Net based Web Services. So "in theory" you should be able to include the Log4Net's class and then call its methods using the #IF/#EndIF approach.
In PB2018 with the new C# Web API feature, you should be able to utilize Log4Net. Just make sure that you use the .Net Core version.
Another alternative could be to use the free STD Web Service framework which supports three types of logging.
For example (internal logging):
IF THIS.of_is_debug_mode( ) = TRUE THEN // Debug mode ON?
THIS.of_write_log ( ls_msg ) // YES=>log it!
END IF
Note: Framework supports Internal, Event and Debug O/S logging
Regards ... Chris