dietpi-logclear - which option is doing what Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
74cmonty
Posts: 18
Joined: Tue Jan 15, 2019 5:25 pm

dietpi-logclear - which option is doing what

Post by 74cmonty »

Hi,
when I execute

Code: Select all

sudo dietpi-logclear
I get this info:

Code: Select all

$ sudo dietpi-logclear
[ INFO ] DietPi-Logclear | Available commands:

 dietpi-logclear 0
 Backup contents of all log files from /var/log to /root/logfile_storage/*.
 Also clears the contents of all logs files in /var/log.

 dietpi-logclear 1
 Clear contents of all logs files in /var/log.

 dietpi-logclear 2
 Physically delete all files in /var/log and backups in /root/logfile_storage/*.
 May prevent log files from being updated, restart services or reboot.
When I display the content in /boot/dietpi.txt I get this info:

Code: Select all

# Logging Mode Selection: 0=none/custom | -1=RAMlog 1h clear | -2=RAMlog 1h save clear | -3=rsyslog + logrotate
AUTO_SETUP_LOGGING_INDEX=-2
In my opinion this is not consistent and my question is:
Which option must I configure to use RAMLOG and save the logfiles before deletion?

THX
User avatar
Joulinar
Posts: 2287
Joined: Sat Nov 16, 2019 12:49 am

Re: dietpi-logclear - which option is doing what

Post by Joulinar »

Hi,

many thanks for your question. From end user point of view you just need to run dietpi-software and select the Log System of your choose. Basically this will do the right settings.

AUTO_SETUP values within /boot/dietpi.txt are applied on first boot of DietPi only, once!

dietpi-logclear is just the worker shell script within the background. It's called once a hour if your have selected RAMlog as loging method)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply