You can translate the question and the replies:

Logger for Custom Function

Custom Policies has a context object available which can log into Denodo server logs. On similar lines, do we have any object available for Custom Function which can log into Denodo server logs?
user
19-12-2016 00:39:26 -0500
code

4 Answers

Hi, I normally enable logging inside my java code(custom function) to log messages into VDP server log by adding the log4j library to my project and then defining a logger in my Custom Fucntion class: ``` import java.util.logging.Logger; public final static Logger LOGGER= Logger.getLogger(CustomConvertFunction.class); ``` You can also define the log level to define which messages from your 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 configuration file for the VDP server which is available in <DENODO_HOME>/conf/vdp/ Hope this helps!
Denodo Team
23-12-2016 09:15:56 -0500
code
What is "CustomConvertFunction.class"?
Denodo Team
12-03-2019 04:55:11 -0400
code
What is “CustomConvertFunction.class”?
user
12-03-2019 04:58:41 -0400
Hello! "CustomConvertFunction" is just the name of the Java class used for the creation of the Custom Function. You also need to keep in mind that Denodo 7 uses version 2 of log4j, so you would need to add the library for log4j2 to your Custom Function Java project, to be able to use the above syntax. Hope this helps!
Denodo Team
19-03-2019 05:51:18 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here