You can translate the question and the replies:

How to change <SizeBasedTriggeringPolicy> of logs to <TimeBasedTriggeringPolicy> and store the logs of the last 7 days in Denodo

Denodo 8.0 Windows operating system Currently, in Denodo 10MB size of 7 log files are storing in denodohome>conf>vdp. I want to modify this, so that I can have the logs of last 7 days. Please let me know the way.
user
16-07-2023 15:19:48 -0400
code

6 Answers

Hi, Denodo uses Log4j, therefore the logging configuration is not specific for Denodo. Log4j config file for VDP are stored in `<DENODO_HOME>\conf\vdp` and logs in `<DENODO_HOME>\logs\vdp`. Have a look at [Configuring the Logging System](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/appendix/configuring_the_logging_engine/configuring_the_logging_engine). For example I configured the log policy of VDP requests to daily, retention up to 7 days with the following lines: ``` <RollingFile name="REQUESTOUT" fileName="C:/Denodo/DenodoPlatform8.0/logs/vdp/vdp-requests${env:vdp.instance.log}.log" filePattern="C:/Denodo/DenodoPlatform8.0/logs/vdp/vdp-requests-%d{MM-dd-yyyy}-%i.log"> <PatternLayout pattern="%-4r [%t] %-5p %d{yyyy-MM-dd'T'HH:mm:ss.SSS} %c %x - %m %n" /> <Policies> <TimeBasedTriggeringPolicy interval="1" modulate="true"/> </Policies> <DefaultRolloverStrategy max="7" /> </RollingFile> ``` Hope this helps.
Denodo Team
18-07-2023 04:48:13 -0400
code
Will this delete the log files that were more than 7 days older? or should I add any extra lines to delete. I tried it by replacing <DefaultRolloverStrategy max="7" /> to max="2" Then the log files older than 2 days should get deleted. I also changed the file pattern as: filePattern="C:/Denodo/DenodoPlatform8.0/logs/vdp/vdp-requests.log.%d{yyyyMMdd}">
user
27-07-2023 14:18:54 -0400
Will this delete the log files that were more than 7 days older? or should I add any extra lines to delete. I tried it by replacing <DefaultRolloverStrategy> to max="2" Then the log files older than 2 days should get deleted. But, I can see the older log files as well. I also changed the file pattern as: filePattern="C:/Denodo/DenodoPlatform8.0/logs/vdp/vdp-requests.log.%d{yyyyMMdd}"> Is this showing any impact
user
27-07-2023 14:24:23 -0400
It should also delete, but test it please. Hope this helps.
Denodo Team
28-07-2023 03:26:49 -0400
code
Tested, it's not deleting for me.
user
28-07-2023 09:50:44 -0400
Hello, you can start with this script that I tested and configure filePattern field: ``` <RollingFile name="REQUESTOUT" fileName="C:/Denodo/DenodoPlatform8.0/logs/vdp/vdp-requests${env:vdp.instance.log}.log" filePattern="C:/Denodo/DenodoPlatform8.0/logs/vdp/vdp-requests-%d{MM-dd-yyyy_HH-mm}-%i.log"> <PatternLayout pattern="%-4r [%t] %-5p %d{yyyy-MM-dd'T'HH:mm:ss.SSS} %c %x - %m %n" /> <Policies> <TimeBasedTriggeringPolicy interval="1" modulate="true"/> </Policies> <DefaultRolloverStrategy max="5" /> </RollingFile> ``` Also try starting with a clean log folder and check only the new generated log files. If you need further assistance and you have an active support account, you could open a support ticket and support team will assist you.
Denodo Team
28-07-2023 10:14:07 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here