DSGW-081-5 how to disable var/log logging?

Hello team

I hope you’re well. I ask a question. How to disable log messages from /var/log folder?

Some days ago, The use of overlay partition was 100%, crashed the device runtime.

A few files on var/log folder use much space:

image

I delete this archives and restart the device and Gateway works well.

How disable the logging functionality? I want enable only when is required.

Best regards

You can modify the policy of logrotate. Typical two files.

/etc/logrotate.conf
/etc/logrotate.d/rsyslog

try to replace **weekly** to **daily**
replace **rotate 4** to **rotate 0** (delete old logs when rotating)


Thanks Yan

I testing you suggestion. I will keep you informed of the results.

Best regards

Hello Yan

The logrotate command does not work. Not rotate files. This command can not create incremental files.

I have discovered how to disable temporarily the logs, and it is by commenting the necessary lines in the /etc/rcsyslog.conf file