To enable the log for my custom function to log message into the Virtual DataPort server log , I would add the log4j2 library to my project and then defining a logger in my Custom Function class similar as below:
public final static Logger LOGGER= Logger.getLogger(CustomConvertFunction.class);
Additionally, I can also add the log level to define which messages from custom function should be written to the server log by using a VQL such as “call logcontroller(‘<package>‘, ‘<log level>)” or by editing the [log4j xml](https://community.denodo.com/docs/html/browse/8.0/vdp/administration/appendix/configuring_the_logging_engine/configuring_the_logging_engine)configuration file for the Virtual DataPort server which is available in <DENODO_HOME>/conf/vdp/.
For more information, you could refer to the below section,
* [Developing Custom Functions](https://community.denodo.com/docs/html/browse/latest/vdp/developer/developing_extensions/developing_custom_functions/developing_custom_functions).
* [Using logcontroller and useful log categories](https://community.denodo.com/kb/view/document/Using%20logcontroller%20and%20useful%20log%20categories?category=Operation).
Hope this helps!