How to log the requests issued on a VDP server

Applies to: Denodo 8.0 , Denodo 7.0 , Denodo 6.0
Last modified on: 28 May 2020
Tags: Administration Server configuration

Download document

You can translate the document:

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 on 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:

  1. Stop the Virtual DataPort Server
  2. Go to the <DENODO_HOME>/conf/vdp folder
  3. Open the log4j2.xml file
  4. Replace the lines:

<logger name="com.denodo.vdp.requests">

<level value="error"/>

<appender-ref ref="REQUESTOUT"/>

</logger>

with:

<logger name="com.denodo.vdp.requests">

<level value="info"/>

<appender-ref ref="REQUESTOUT"/>

</logger>


        
Note that the only change is the level value from  "error" to "info”.

  1. 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.

An example can be as following:

  • 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 from 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

LOGCONTROLLER

Configuring the Logging System

Questions

Ask a question
You must sign in to ask a question. If you do not have an account, you can register here

Featured content

DENODO TRAINING

Ready for more? Great! We offer a comprehensive set of training courses, taught by our technical instructors in small, private groups for getting a full, in-depth guided training in the usage of the Denodo Platform. Check out our training courses.

Training