Content
The Denodo Virtual DataPort Server provides the possibility to log the requests sent to the Virtual DataPort Server. So, any queries which the server receives will be written to the log file <DENODO_HOME>/logs/vdp/vdp-requests.log.
There are two ways to activate the log level:
- Configuring the log level persistently using the log configuration file <DENDODO_HOME>/conf/vdp/log4j.xml.
- Configuring it temporarily by running the stored procedure logcontroller.
We will first have a look at the first approach and then at the second one.
For configuring the log level persistently the file vdp-requests.log located under <DENODO_HOME>\logs\vdp should be used to log information about the requests sent to the Virtual DataPort server.
By default, the information about requests will not be logged. To enable it you need to follow these steps:
- Stop the Virtual DataPort Server
- Go to the <DENODO_HOME>/conf/vdp folder
- Open the log4j2.xml file
- Replace the lines:
<Logger name="com.denodo.vdp.requests" level="error" additivity="false">
<AppenderRef ref="REQUESTOUT" />
</Logger>
with:
<Logger name="com.denodo.vdp.requests" level="info" additivity="false">
<AppenderRef ref="REQUESTOUT" />
</Logger>
Note that the only change is the level value from "error" to "info”.
- Restart the VDP server.
After these changes, the requests arriving at the VDP server will be logged to the vdp-requests.log file.
An example request we will see the following information:
61381 [RMI(14)-192.168.0.45-20] INFO 2018-03-23T11:22:35.524 com.denodo.vdp.requests - SELECT * FROM phone_inc CONTEXT ('i18n'='us_pst') TRACE
where:
- 61381 is the time since the first log message was written once the server was started.
- 14 is the connection identifier.
- 192.168.0.45 is the ip of the client computer.
- 20 is the session identifier.
- 2018-03-23T11:22:35.524 is the timestamp when the query was executed.
- SELECT * FROM phone_inc CONTEXT ('i18n'='us_pst') TRACE is the request executed.
If the log level should only be changed temporarily, for example, during a certain session the built-in LOGCONTROLLER stored procedure can be used. The main differences to the approach above are:
- The log level changes immediately after executing the procedure.
- The log level is not changed permanently.
- Changing the log level will not require a restart.
The following is an example:
- Check the log level configured in the file <DENODO_HOME>/conf/vdp/log4j2.xml.
- Open the VQL Shell.
- Change the log level to something different than what you see in the file for the logger category com.denodo.vdp.requests. Which log levels are available can be found in LOGCONTROLLER.
- Run for instance in case the info level is not set:
- call logcontroller('com.denodo.vdp.requests', 'info')
After running this statement you will find the same output in the file vdp-requests.log as above for this log category. Of course, this works also for other log categories.
References
Configuring the Logging System
The information provided in the Denodo Knowledge Base is intended to assist our users in advanced uses of Denodo. Please note that the results from the application of processes and configurations detailed in these documents may vary depending on your specific environment. Use them at your own discretion.
For an official guide of supported features, please refer to the User Manuals. For questions on critical systems or complex environments we recommend you to contact your Denodo Customer Success Manager.